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

ubuntu 十服务器 mysql简单安装

2012-09-24 
ubuntu 10服务器 mysql简单安装安装MySQL?sudo apt-get install mysql-server??配置进入mysql?mysql -u ro

ubuntu 10服务器 mysql简单安装

安装MySQL

?

sudo apt-get install mysql-server

?

?配置

进入mysql

?

mysql -u root
?

在ubuntu中mysql安装,默认是只能本机访问的,需要打开用户权限和mysql的本机绑定
1、在命令行底下打开用户权限:

grant all privileges on drupal.* to user@192.168.1.80 identified by 'user-password';

?
?? 在管理员界面可以通过用户管理add host->any host来添加访问权限(root用户默认只能访问本机,新添加的用户可远程)
2、取消mysql本机绑定:
编辑/etc/mysql/my.cnf
# Instead of skip-networking the default is now to listen only on
# localhost which is more compatible and is not less secure.
bind-address = 127.0.0.1
将”bind-address = 127.0.0.1“注释

重启即可远程访问

?

sudo /etc/init.d/mysql restart
?

热点排行