rm -rf /usr/local/mysql/var/ ./mysql_install_db WARNING: The host 'MyServer' could not be looked up with resolveip. This probably means that your libc libraries are not 100 % compatible with this binary MySQL version. The MySQL daemon, mysqld, should work normally with the exception that host name resolving will not work. This means that you should use IP addresses instead of hostnames when specifying MySQL privileges ! Installing MySQL system tables... 160718 21:29:50 [Note] ./bin/mysqld (mysqld 5.5.48-log) starting as process 22978 ... OK Filling help tables... 160718 21:29:50 [Note] ./bin/mysqld (mysqld 5.5.48-log) starting as process 22985 ... 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:
Alternatively you can run: ./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 . ; ./bin/mysqld_safe & You can test the MySQL daemon with mysql-test-run.pl cd ./mysql-test ; perl mysql-test-run.pl
Please report any problems at http://bugs.mysql.com/
此时启动mysql服务会报错:
1 2 3 4 5 6 7
160718 21:34:32 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/var 160718 21:34:32 [Note] /usr/local/mysql/bin/mysqld (mysqld 5.5.48-log) starting as process 24777 ... /usr/local/mysql/bin/mysqld: File './mysql-bin.index' not found (Errcode: 13) 160718 21:34:32 [ERROR] Aborting 160718 21:34:32 [Note] /usr/local/mysql/bin/mysqld: Shutdown complete 160718 21:34:32 mysqld_safe mysqld from pid file /usr/local/mysql/var/MyServer.pid ended