Welcome 微信登录

首页 / 数据库 / MySQL / 使用MySQL时的遇到问题整理

1 ERROR 2002(HY000): Can"t connect to local MySQL server through socket" /var/lib/mysql/mysql.sock"(2)未启动MySQL MySQL的问题2 ERROR 1045(28000): Access denied for user "root"@"localhost" (using password: NO)密码错了,修改root用户的密码:2.1 方法一mysqladmin -uroot -ppassword "newpassword"2.2 方法二# /etc/init.d/mysql stop# mysqld_safe--user=mysql --skip-grant-tables --skip-networking &# mysql -u root mysqlmysql> UPDATE userSET Password=PASSWORD("newpassword") where USER="root";mysql> FLUSHPRIVILEGES;mysql> quit # /etc/init.d/mysqlrestart# mysql -uroot -pEnter password: <输入新设的密码newpassword>3 Can"tconnect to MySQL server on "192.168.10.31" (10060)IP写错了, 或者端口没有开放. 4 ERROR 1130:Host "192.168.1.3" is not allowed to connect to this MySQL server4.1 改表法在localhost的那台电脑,登入mysql后,更改"mysql"数据库里的"user"表里的"host"项,从"localhost"改成"%"mysql -u root -pmysql> use mysql;mysql> update userset host = "%" where user = "root";mysql> select host,user from user;4.2 授权法mysql> grant all privilegeson *.* to "yourname"@"%" identified by "youpasswd";Query OK, 0 rowsaffected (0.05 sec)mysql> flushprivileges;Query OK, 0 rowsaffected (0.06 sec)mysql> exitPhpMyAdmin 导入大数据库文件Oracle 工具:tkprof相关资讯      MySQL基础知识 
  • MySQL增加普通用户后无法登陆问题  (12/15/2012 19:35:24)
  • MySQL连接查询精解  (12/11/2012 09:19:27)
  • MySQL备份与恢复的三种方法总结  (12/05/2012 12:15:32)
  • MySQL 多表 update sql语句总结  (12/11/2012 09:52:37)
  • Ubuntu下更改MySQL数据库文件的目  (12/08/2012 21:29:31)
  • MySQL游标循环示例  (12/05/2012 07:05:56)
本文评论 查看全部评论 (0)
表情: 姓名: 字数