你好,在LINUX下运行MYSQL出现以下问题:我安装是在 usr/local/mysql/bin/目录下 但是我运行 mysqladmin 时出现以下错误:mysqladmin:connect to server at "locahost" failed; error:access denied for user "root@locahost"(using password :yes)'MSN/EMAIL:[email protected]谢谢
楼上各位的问题我都出现过,后来严格按照MySQL Mannual上的说法就OK了 shell> groupadd mysql(不要变这个名字) shell> useradd -g mysql mysql(不要变这个名字) shell> tar zxvf mysql-VERSION.tar.gz shell> cd mysql-VERSION shell> ./configure --prefix=/usr/local/mysql --with-charset=gb2312 shell> make shell> make install shell> scripts/mysql_install_db shell> chown -R root /usr/local/mysql shell> chown -R mysql /usr/local/mysql/var shell> chgrp -R mysql /usr/local/mysql shell> cp support-files/my-medium.cnf /etc/my.cnf shell> /usr/local/mysql/bin/mysqld_safe --user=mysql &这样进入: shell> cd /use/local/mysql/bin shell> ./mysql -u root -p(我也不知道问什么要加个./) enter password:回车就OK了开机自动加载MySQL/usr/local/mysql/share/mysql/mysql.server复制到/etc/init.d shell>chkconfig –add mysql.server使MySQL在开机时自动运行
连接localhost不得行 出错信息不记得了
不过奇怪的是我用机子的IP就可以连上了(声明:不是数据库mysql user表的问题)
你试一下这样可以不
不行的话 确定MYSQL服务启动,文件的权限有什么问题没有
但是我运行 mysqladmin 时出现以下错误:mysqladmin:connect to server at "locahost" failed;
error:access denied for user "root@locahost"(using password :yes)'MSN/EMAIL:[email protected]谢谢
shell> groupadd mysql(不要变这个名字)
shell> useradd -g mysql mysql(不要变这个名字)
shell> tar zxvf mysql-VERSION.tar.gz
shell> cd mysql-VERSION
shell> ./configure --prefix=/usr/local/mysql --with-charset=gb2312
shell> make
shell> make install
shell> scripts/mysql_install_db
shell> chown -R root /usr/local/mysql
shell> chown -R mysql /usr/local/mysql/var
shell> chgrp -R mysql /usr/local/mysql
shell> cp support-files/my-medium.cnf /etc/my.cnf
shell> /usr/local/mysql/bin/mysqld_safe --user=mysql &这样进入:
shell> cd /use/local/mysql/bin
shell> ./mysql -u root -p(我也不知道问什么要加个./)
enter password:回车就OK了开机自动加载MySQL/usr/local/mysql/share/mysql/mysql.server复制到/etc/init.d
shell>chkconfig –add mysql.server使MySQL在开机时自动运行