2016-06-06 2 views
1

Ich habe gerade installiert mySQL 5.1.55 auf einem Kasten Linux, und es scheint okmySQL: „Zugang für Benutzer‚root‘verweigert @ 'localhost“ nach der Installation der Software

# /usr/local/mysql/bin/mysql_install_db 
Installing MySQL system tables... 
160606 21:46:25 [Warning] '--skip-locking' is deprecated and will be removed in a future release. Please use '--skip-external-locking' instead. 
OK 
Filling help tables... 
160606 21:46:26 [Warning] '--skip-locking' is deprecated and will be removed in a future release. Please use '--skip-external-locking' instead. 
OK 

To start mysqld at boot time you have to copy 
support-files/mysql.server to the right place for your system 

PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER ! 
To do so, start the server, then issue the following commands: 

/usr/local/mysql-5.1.55/bin/mysqladmin -u root password 'new-password' 

Alternatively you can run: 
/usr/local/mysql-5.1.55/bin/mysql_secure_installation 

which will also give you the option of removing the test 
databases and anonymous user created by default. This is 
strongly recommended for production servers. 

See the manual for more instructions. 

You can start the MySQL daemon with: 
cd /usr/local/mysql-5.1.55 ; /usr/local/mysql-5.1.55/bin/mysqld_safe & 

You can test the MySQL daemon with mysql-test-run.pl 
cd /usr/local/mysql-5.1.55/mysql-test ; perl mysql-test-run.pl 

Please report any problems with the /usr/local/mysql-5.1.55/bin/mysqlbug script! 

jedoch zu sein, wenn ich betreibe

# /usr/local/mysql-5.1.55/bin/mysqladmin -u root password foo 

ich diese Fehlermeldung:

/usr/local/mysql-5.1.55/bin/mysqladmin: connect to server at 'localhost' failed 
error: 'Access denied for user 'root'@'localhost' (using password: NO)' 

Wenn ich laufen:

# /usr/local/mysql-5.1.55/bin/mysql -u root -p 

Ich bin, um herauszufinden, nicht in der Lage, die das Passwort ist: ES

Jede Hilfe ist willkommen. Vielen Dank.

Antwort

0

Wenn Sie MySQL installiert haben, ohne

> mysql_secure_installation 

Skript dort ausgeführt wird, sollte überhaupt kein Passwort sein. Geben Sie einfach

> mysql 

und sehen, was passiert. Wenn das fehlschlägt, können Sie nach der mysql manual

immer noch ein neues Root-Passwort festlegen
Verwandte Themen