Linux Mysql服务器安装配置

直接安装Redhat Enterprise 5系统自带的MySQL rpm即可(版本:5.0.22)

service mysqld start //__开启MySQL服务

安装完后MySQL的默认密码为空,直接运行客户端程序#mysql  
然后你可以看到屏幕显示出以下信息:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 362
Server version: 5.0.45-community MySQL Community Edition (GPL)

Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the buffer.

修改用户密码
#mysqladmin -u root password ‘newpassword’  //
本机登陆
#mysql -u root -p
#password *******

添加远程访问权限
进入MySQL命令行
mysql>GRANT ALL PRIVILEGES ON *.* TO root@”%” IDENTIFIED BY ‘password’ WITH GRANT OPTION;

添加mysql服务到启动项内

客户端工具:mysqlcc-0.9.4-win32

————————
/etc/my.cnf
————————

[mysql]
default-character-set=utf8 

[mysqld]
lower_case_table_names=1  不区分大小写
default-character-set=utf8

By Lu Jun

80后男,就职于软件行业。习于F*** GFW。人生48%时间陪同电子设备和互联网,美剧迷,高清视频狂热者,游戏菜鸟,长期谷粉,临时果粉,略知摄影。

Leave a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.