Возникла проблема.
Код: Выделить всё
13:12 [p0]root#mail:/var/db/mysql>ll
total 20538
-rw-rw---- 1 mysql mysql 5242880 2 авг 12:55 ib_logfile0
-rw-rw---- 1 mysql mysql 5242880 19 апр 07:47 ib_logfile1
-rw-rw---- 1 mysql mysql 10485760 2 авг 12:55 ibdata1
-rw-rw---- 1 mysql mysql 5 2 авг 12:55 mail.etc.net.ua.pid
drwx------ 2 mysql mysql 1536 19 апр 07:46 mysql/
drwx------ 2 mysql mysql 512 3 май 08:35 pureftpd/
drwx------ 2 mysql mysql 1024 19 апр 08:26 sacc/
drwx------ 2 mysql mysql 512 19 апр 07:46 test/
Код: Выделить всё
13:12 [p0]root#mail:/var/db/mysql>mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 9 to server version: 4.1.22
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> use mysql;
ERROR 1044 (42000): Access denied for user ''@'localhost' to database 'mysql'
mysql> quit;
Bye
Код: Выделить всё
# /usr/local/etc/rc.d/mysql-server stop
13:13 [p0]root#mail:/var/db/mysql>ps ax | grep mysql
29801 p0 R+ 0:00,00 grep mysql
# /usr/local/bin/mysqld_safe --skip-grant-tables &
13:15 [p0]root#mail:/var/db/mysql>mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1 to server version: 4.1.22
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> use mysql;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
mysql> show tables;
+---------------------------+
| Tables_in_mysql |
+---------------------------+
| columns_priv |
| db |
| func |
| help_category |
| help_keyword |
| help_relation |
| help_topic |
| host |
| tables_priv |
| time_zone |
| time_zone_leap_second |
| time_zone_name |
| time_zone_transition |
| time_zone_transition_type |
| user |
+---------------------------+
15 rows in set (0.00 sec)
mysql> show databases;
+----------+
| Database |
+----------+
| mysql |
| pureftpd |
| sacc |
| test |
+----------+
4 rows in set (0.00 sec)
mysql> UPDATE user SET PASSWORD=('123321') WHERE USER='root';
Query OK, 2 rows affected (0.09 sec)
Rows matched: 2 Changed: 2 Warnings: 0
mysql> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.04 sec)
mysql> quit;
Bye
Код: Выделить всё
13:16 [p0]root#mail:/var/db/mysql>/usr/local/etc/rc.d/mysql-server restart
Stopping mysql.
mesg: /dev/ttyp0: Operation not permitted
Waiting for PIDS: 29825STOPPING server from pid file /var/db/mysql/mail.etc.net.ua.pid
070802 13:16:40 mysqld ended
.
Starting mysql.
mesg: /dev/ttyp0: Operation not permitted
[1] + Окончено /usr/local/bin/mysqld_safe --skip-grant-tables
13:16 [p0]root#mail:/var/db/mysql>ps ax | grep mysql
29873 p0 S 0:00,02 /bin/sh /usr/local/bin/mysqld_safe --defaults-extra-file=/var/db/mysql/my.cnf --user=mysql --datadir=/var/db/mysql --pid-file=/var/
29893 p0 S 0:00,26 /usr/local/libexec/mysqld --defaults-extra-file=/var/db/mysql/my.cnf --basedir=/usr/local --datadir=/var/db/mysql --user=mysql --pi
29896 p0 RL+ 0:00,00 grep mysql
Код: Выделить всё
13:16 [p0]root#mail:/var/db/mysql>mysql -u root -p
Enter password:
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
Код: Выделить всё
13:17 [p0]root#mail:/var/db/mysql>mysql -u root;
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 2 to server version: 4.1.22
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> show databases;
+----------+
| Database |
+----------+
| test |
+----------+
1 row in set (0.00 sec)
mysql> use mysql;
ERROR 1044 (42000): Access denied for user ''@'localhost' to database 'mysql'
mysql> exit
Bye