linux下使用mysql服务

1)mysql服务的安装

1.1 安装Linux系统时选择安装mysql服务

1.2 如果Linux服务器能连接外网,可以使用yum进行安装

2)mysql数据库修改root密码

[root@localhost] mysqld_safe --skip-grant-tables &

然后再开一个终端,

[root@localhostmysql

mysql> use mysql;

mysql> UPDATE user SET password=password("root") WHERE user='root'; 

mysql> flush privileges;

mysql> exit;

3)启动mysql

[root@localhost] service mysqld start

4)关闭防火墙

[root@localhost] service iptables stop

5)linux登录mysql

[root@localhost] mysql -uroot -p

Enter password: (输入密码即可)



http://blog.csdn.net/mr__fang/article/details/8874411

http://jingyan.baidu.com/album/a378c9609eb652b3282830fd.html?picindex=1

https://www.baidu.com/s?wd=Access%20denied%20for%20user%20%27root%27%40%27localhost%27%20(using%20password%3A%20NO)&pn=10&oq=Access%20denied%20for%20user%20%27root%27%40%27localhost%27%20(using%20password%3A%20NO)&tn=baiduhome_pg&ie=utf-8&usm=1&rsv_idx=2&rsv_pq=85323dd700006ba1&rsv_t=f176dZ4rj1jvSC%2FEW1BytlEStmSNQtSXXtxT30KusbZZgAxUo6dXNj5GE%2Bgu2A%2FlqbJw&rsv_page=1

http://99tiantian.blog.163.com/blog/static/22005651201232321811472/

http://zhidao.baidu.com/link?url=5zl82frPDliuFN5b_4do8H1lJDqYcrZ4cxHAcem5rmOSkDWr5XhpIeHEcWAfraf9j-6tCBnRhU3-DKek31wuna

http://zhidao.baidu.com/link?url=lOL0RgMXjhKOEvAOX6tdJWSjQNx8AM23hO20My5UfhduB8ghMmPeLA850-4eUPZsatabbnUQBYm9JvwfxWq8jK

http://www.111cn.net/database/mysql/42040.htm

http://jingyan.baidu.com/article/0320e2c198ad5f1b87507bc8.html

http://blog.knowsky.com/193552.htm

http://www.2cto.com/database/201501/372605.html

http://blog.sina.com.cn/s/blog_413f41c20101k4hm.html


你可能感兴趣的:(linux,mysql)