linux下安装mysql初始化时失败后,如何解决?
试试启动这个:
/mysql/bin/mysqld_safe &
或者试试:
1,安装mysql
mysql-5.0.41-linux-i686-glibc23.tar.gz 由于mysql是二进制包。所以还是比较方便的。
直接解压。然后移动。
mv mysql-5.0.41-linux-x86_64-glibc23 /usr/local/mysql
cd /usr/local/mysql
groupadd mysql
useradd -g mysql mysql
chown -R mysql .
chgrp -R mysql .
chown -R root .
./scripts/mysql_install_db --user=mysql --basedir=/usr/local/mysql --datadir=/home/www/mysql/data
cp /usr/local/mysql/support-files/my-huge.cnf /etc/my.cnf
cp /usr/local/mysql/support-files/mysql.server /etc/rc.d/init.d/mysqld
chmod 755 /etc/rc.d/init.d/mysqld
chkconfig –add mysqld
chkconfig --level 3 mysqld on
mv /usr/local/mysql/data /home/www/mysql
chown -R mysql:mysql /home/www/mysql
编辑/etc/my.cnf
在 [mysqld] 段增加
datadir = /home/www/mysql
skip-innodb
wait-timeout = 10
max_connections = 512
max_connect_errors = 10000000
在 [mysqld] 段修改
max_allowed_packet = 16M
thread_cache_size = CPU个数*2
将 log-bin 注释
service mysqld start
bin/mysqladmin -u root -p