Installation completed the MySQL service error when initializing the database
[[email protected] mysql]# /application/mysql/bin/mysql_ Install_db --basedir=/application/mysql/ --datadir=/application/mysql/data/ --user=mysqlfatal ERROR: Could not find errmsg.sysThe following directories were searched: /application/mysql//share/english /application/mysql// share/mysql/englishif you compiled from source, you need to run ' Make install ' tocopy the software into the correct location ready for operation. if you are using a binary release, you must either be at the toplevel of the extracted archive, or pass the -- Basedir optionpointing to that location.
Intend to recompile again./configure is normal, but one to make when the error, as follows
Make error
mysql.cc:1040: error: redefinition of ' Struct _hist_entry '. /include/readline/readline.h:55: error: previous definition of ' Struct _hist_ Entry ' mysql.cc:1043: error: invalid type in declaration before '; ' tokenmysql.cc:1043: error: conflicting declaration ' Typedef int hist_ ENTRY '. /include/readline/readline.h:58: error: ' Hist_entry ' has a previous declaration as ' typedef struct _hist_entry hist_entry ' mysql.cc: in function ' void initialize_readline (char*) ':mysql.cc:2455: error: ' rl_completion_func_t ' was not declared in this scopemysql.cc:2455: error: expected primary-expression before ' tokenmysql.cc:2456: error: invalid conversion from ' char* (*) (const char*, int) ' to 'int (*) (const char*, int) ' Mysql.cc:2458: error: invalid conversion from ' int (*) (int, int) ' to ' int (*) (Const char*, int) ' mysql.cc:2458: error: initializing argument 2 of ' Int rl_add_defun (const char*, int (*) (Const char*, int), int) ' make[2]: *** [mysql.o] error 1make[2]: leaving directory '/home/admin/tools/mysql-5.1.62/client ' make[1]: *** [all] Error 2make[1]: Leaving directory '/home/admin/tools/mysql-5.1.62/client ' Make: *** [all-recursive] error 1
After unremitting struggle, found is because of the first time installation,./configure make forgot make install. and recompile.
Here's how to fix it:
Rm-fr ' Find/-name MySQL ' # # #删除所有安装的内容
rm-fr/application/mysql* # # #删除安装路径的mysql
After restarting Linux recompile installation
Successful installation, output display after initializing the database
[[email protected] mysql]# /application/mysql/bin/mysql_install_db --basedir=/ Application/mysql --datadir=/application/mysql/data/ --user=mysqlinstalling mysql system tables ... 170222 8:50:13 [warning] '--skip-locking ' is deprecated and will be removed in a future release. Please use '-- Skip-external-locking ' instead. Okfilling help tables ... 170222 8:50:13 [warning] '--skip-locking ' is deprecated and will be removed in a future release. Please use '-- Skip-external-locking ' instead. okto start mysqld at boot time you have to copysupport-files/ Mysql.server to the right place for your systemplease remember to set a password for the mysql root user ! to do so, start the server, then issue the following commands:/application/mysql/bin/mysqladmin -u root password ' New-password '/application/ mysql/bin/mysqladmin -u root -h mysql password ' New-password ' Alternatively You can run:/application/mysql/bin/mysql_secure_installationwhich will also give you the option of removing the testdatabases and anonymous user created by default. this isstrongly recommended for Production servers. See the manual for more instructions. you can start the mysql daemon with:cd /application/mysql ; / Application/mysql/bin/mysqld_safe &you can test the mysql daemon with mysql-test-run.plcd /aPplication/mysql/mysql-test ; perl mysql-test-run.plplease report any problems with the /application/mysql/scripts/mysqlbug script!
Configure MySQL default configuration and INIT.D boot
CP support-files/my-small.cnf/etc/my.cnf CP Support-files/mysql.server/etc/init.d/chmod +x/etc/init.d/mysql.server Mv/etc/init.d/mysql.server/etc/init.d/mysqld/etc/init.d/mysqld start
Finally Configure path
Echo ' path=/application/mysql/bin/: $PATH ' >>/etc/profile
This article is from the "Dongliqiang" blog, make sure to keep this source http://6207422.blog.51cto.com/6197422/1900093
CentOS installation MySQL encounters a problem