首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 数据库 > Mysql >

Ubuntu11 mysql 初始密码及远程连接设立

2012-08-14 
Ubuntu11 mysql 初始密码及远程连接设置1.初始密码??? #?cat /etc/mysql/debian.cnf?打印如下# Automatica

Ubuntu11 mysql 初始密码及远程连接设置

1.初始密码

??? #?cat /etc/mysql/debian.cnf

?

打印如下

# Automatically generated for Debian scripts. DO NOT TOUCH!
[client]
host???? = localhost
user???? = debian-sys-maint
password = jgOaVkxkgDrOq0uS
socket?? = /var/run/mysqld/mysqld.sock
[mysql_upgrade]
host???? = localhost
user???? = debian-sys-maint
password = jgOaVkxkgDrOq0uS
socket?? = /var/run/mysqld/mysqld.sock
basedir? = /usr
??

??? #mysql -udebian-sys-maint -pjgOaVkxkgDrOq0uS

??? #grant all privileges on *.* to root@'localhost(或者远程用%)' identified by '密码' with grant option;

??? #flush privileges;

?

?

2.远程连接

??? #grant all privileges on *.* to root@'%' identified by '密码' with grant option;

??? #sudo vi /etc/mysql/my.cnf
???

bind-address?????????? = 127.0.0.1 这一行要注释掉

#bind-address?????????? = 127.0.0.1

????

热点排行