LinuxForum.Fans
Тема

Пароль mysql

Автор: slider 78 сообщений 10379 просмотров
#234921

[console]root@282449:~# aptitude purge mysql-client-5.1 mysql-server-5.1 mysql-server-cor
e-5.1
The following packages will be REMOVED:
mysql-client-5.1{p} mysql-server-5.1{p} mysql-server-core-5.1{p}
The following partially installed packages will be configured:
mysql-server{b}
0 packages upgraded, 0 newly installed, 3 to remove and 0 not upgraded.
Need to get 0 B of archives. After unpacking 53.0 MB will be freed.
The following packages have unmet dependencies:
mysql-server: Depends: mysql-server-5.1 but it is not going to be installed.
mysql-client: Depends: mysql-client-5.1 but it is not going to be installed.
The following actions will resolve these dependencies:

Remove the following packages:
1) mysql-client
2) mysql-server

Leave the following dependencies unresolved:
3) phpmyadmin recommends mysql-client


Accept this solution? [Y/n/q/?] y
The following packages will be REMOVED:
libhtml-template-perl{u} mysql-client{a} mysql-client-5.1{p}
mysql-server{a} mysql-server-5.1{p} mysql-server-core-5.1{p}
0 packages upgraded, 0 newly installed, 6 to remove and 0 not upgraded.
Need to get 0 B of archives. After unpacking 53.4 MB will be freed.
Do you want to continue? [Y/n/?] y
(Reading database ... 27936 files and directories currently installed.)
Removing mysql-server ...
(Reading database ... 27932 files and directories currently installed.)
Removing mysql-server-5.1 ...
Stopping MySQL database server: mysqld.
Purging configuration files for mysql-server-5.1 ...
dpkg: warning: while removing mysql-server-5.1, directory '/etc/mysql' not empty
so not removed.
Processing triggers for man-db ...
(Reading database ... 27842 files and directories currently installed.)
Removing libhtml-template-perl ...
Removing mysql-client ...
Processing triggers for man-db ...
(Reading database ... 27829 files and directories currently installed.)
Removing mysql-client-5.1 ...
Removing mysql-server-core-5.1 ...
Processing triggers for man-db ...

root@282449:~#[/console]

#234922
text
$ ls -la /etc/mysql
$ ls -la /var/lib/mysql 

показывай.
ы. Теги лучше не console, а code.

#234924
text
root@282449:~# ls -la /etc/mysql
total 12
drwxr-xr-x  2 root root 4096 Mar  5 03:13 .
drwxr-xr-x 82 root root 4096 Mar  5 03:03 ..
-rw-------  1 root root  333 Mar  5 03:03 debian.cnf
text
root@282449:~# ls -la /var/lib/mysql
total 16
drwx------  3 mysql mysql 4096 Mar  5 03:13 .
drwxr-xr-x 35 root  root  4096 Mar  5 03:03 ..
-rw-rw----  1 mysql root  1859 Mar  5 03:13 282449.pwgenesis.iphoster.ru.err
-rw-r--r--  1 mysql root     0 Mar  5 03:03 debian-5.1.flag
drwx------  2 mysql root  4096 Mar  5 03:03 mysql
root@282449:~#

ок)
Последовательность моих действий была такой:
[console]aptitude purge mysql-server mysql-client[/console]
И переименовал папки

text
/etc/mysql
/var/lib/mysql

в

text
/etc/mysql1
/var/lib/mysql1
#234925

И под конец

text

$ aptitude install mysql-server mysql-client
#234927

Да :(

#234929

Ну подсунь в /etc/mysql/my.cnf он его найти не может, хотя по умолчанию должен ставить.
После того как подсунешь

text
/etc/init.d/mysql start

ну и dpkg-reconfigure mysql

#234931

Из папки /etc/mysql1/ в папку /etc/mysql/ только my.cnf подсунуть?

#234932

ы. Еще снести руками попробуй после aptitude purge

text
/usr/share/mysql
/usr/share/mysql-common
#234933

Немного запутал) Что именно сейчас сделать? :o

#234936
slider написал:
Немного запутал) Что именно сейчас сделать? :o

Ну сначала /etc/mysql/my.cnf создай и попробуй стартануть мускл

text
$ /etc/init.d/mysql start

Вот тебе дефолтный my.cnf http://paste.debian.net/158547/

#234938

Как то так

text
root@282449:~# apt-get install mysql-server
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  libhtml-template-perl mysql-client-5.1 mysql-server-5.1
  mysql-server-core-5.1
Suggested packages:
  libipc-sharedcache-perl libterm-readkey-perl tinyca
The following NEW packages will be installed:
  libhtml-template-perl mysql-client-5.1 mysql-server mysql-server-5.1
  mysql-server-core-5.1
0 upgraded, 5 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/20.9 MB of archives.
After this operation, 53.3 MB of additional disk space will be used.
Do you want to continue [Y/n]? y
Preconfiguring packages ...
Selecting previously deselected package mysql-client-5.1.
(Reading database ... 27688 files and directories currently installed.)
Unpacking mysql-client-5.1 (from .../mysql-client-5.1_5.1.49-3_amd64.deb) ...
Selecting previously deselected package mysql-server-core-5.1.
Unpacking mysql-server-core-5.1 (from .../mysql-server-core-5.1_5.1.49-3_amd64.d
eb) ...
Selecting previously deselected package mysql-server-5.1.
Unpacking mysql-server-5.1 (from .../mysql-server-5.1_5.1.49-3_amd64.deb) ...
Selecting previously deselected package libhtml-template-perl.
Unpacking libhtml-template-perl (from .../libhtml-template-perl_2.9-2_all.deb) .
..
Selecting previously deselected package mysql-server.
Unpacking mysql-server (from .../mysql-server_5.1.49-3_all.deb) ...
Processing triggers for man-db ...
Setting up mysql-client-5.1 (5.1.49-3) ...
Setting up mysql-server-core-5.1 (5.1.49-3) ...
Setting up mysql-server-5.1 (5.1.49-3) ...
Stopping MySQL database server: mysqld.
Starting MySQL database server: mysqld.
Checking for corrupt, not cleanly closed and upgrade needing tables..
Setting up libhtml-template-perl (2.9-2) ...
Setting up mysql-server (5.1.49-3) ...
text
root@282449:~# /etc/init.d/mysql start
Starting MySQL database server: mysqld already running.
root@282449:~#
#234941

Ну все работает, в чем проблема?

#234943

проблема в том что при установке мускул не просит пароля, и я не могу к нему приконектиться, даже phpmyadmin не работает нормально(

#234945

Пробовал, не помогло. вроде все идет как надо. но коннекта нету все равно(((

#234946
text
/etc/init.d/mysql stop
text
mysqld_safe --skip-grant-tables &
text
mysql -u root mysql
text
mysql> update user set Password=PASSWORD('новый_пароль') where User='root';
mysql> flush privileges;
mysql> exit
text
 /etc/init.d/mysql restart
#234948

Пароль новый поставил?

#234952

Да. сейчас попробовал вроде бы получилось, но при установке phpmyadmin бьет
Package configuration

text

 ┌────────────────────────┤ Configuring phpmyadmin ├─────────────────────────┐
 │                                                                           │
 │ An error occurred while installing the database:                          │
 │                                                                           │
 │ ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using      │
 │ password: NO)                                                             │
 │                                                                           │
 │ If at this point you choose "retry", you will be prompted with all the    │
 │ configuration questions once more and another attempt will be made at     │
 │ performing the operation. "retry (skip questions)" will immediately       │
 │ attempt the operation again, skipping all questions.  If you choose       │
 │ "abort", the operation will fail and you will need to downgrade,          │
 │ reinstall, reconfigure this package, or otherwise manually intervene to   │
 │ continue using it.  If you choose "ignore", the operation will continue,  │
 │ ignoring further errors from dbconfig-common.                             │
 │                                                                           │
 │                                  <Ok>                                     │
#234956

phpmyadmin ф топку.

Войдите или зарегистрируйтесь, чтобы ответить.