Home > OS >  CentOS installed mysql start then submitted to the Input/output error
CentOS installed mysql start then submitted to the Input/output error

Time:10-28

The code is as follows:

/root @ ZER ~ # service mysql start
The/etc/init. D/mysql: line 256:/usr/bin/my_print_defaults: Input/output error
Starting MySQL. The server quit without updating The PID file (/var/lib/MySQL/ZER PID)

Seek the solution

CodePudding user response:

1. Edit the configuration file:

Vim/etc/my CNF

Basedir=/usr/local/mysql
Datadir=/data/mysql
The socket=/TMP/mysql. The sock
Log - error=/data/mysql/error log
Pid - file=/data/mysql/mysql. Pid
User=mysql
Tmpdir=/TMP

2. The re-initialization mysql:

./mysql_install_db - user=mysql - basedir=/usr/local/mysql - datadir=/data/mysql - pid - file=/data/mysql/mysql. Pid - tmpdir=/TMP

CodePudding user response:

Initialized before your data directory file, initialization, again suggest restart after changed the configuration file, make him take effect,
  • Related