centos5.8安装mysql,centos 5.8 64bit rpm 安装mysql5.5

安装mysql

[root@localhost local]# rpm -ivh MySQL-server-5.5.32-2.rhel5.x86_64.rpm

error: Failed dependencies:

MySQL conflicts with mysql-5.0.77-4.el5_6.6.x86_64

[root@localhost local]#

[root@localhost local]# rpm -ivh MySQL-server-5.5.32-2.rhel5.x86_64.rpm  --nodeps --force

Preparing...                ########################################### [100%]

1:MySQL-server           ########################################### [100%]

PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !

To do so, start the server, then issue the following commands:

/usr/bin/mysqladmin -u root password 'new-password'

/usr/bin/mysqladmin -u root -h localhost.localdomain password 'new-password'

Alternatively you can run:

/usr/bin/mysql_secure_installation

which will also give you the option of removing the test

databases and anonymous user created by default.  This is

strongly recommended for production servers.

See the manual for more instructions.

Please report any problems with the /usr/bin/mysqlbug script!

安装mysql客户端

[root@localhost local]# rpm -ivh MySQL-client-5.5.32-2.rhel5.x86_64.rpm --nodeps --force

Preparing...                ########################################### [100%]

1:MySQL-client           ########################################### [100%]

[root@localhost local]#

启动mysql服务

[root@localhost local]# service mysql start

Starting MySQL.........                                    [纭甝

[root@localhost local]# netstat -nat

Active Internet connections (servers and established)

Proto Recv-Q Send-Q Local Address               Foreign Address             State

tcp        0      0 127.0.0.1:2208              0.0.0.0:*                   LISTEN

tcp        0      0 0.0.0.0:997                 0.0.0.0:*                   LISTEN

tcp        0      0 0.0.0.0:3306                0.0.0.0:*                   LISTEN

tcp        0      0 0.0.0.0:111                 0.0.0.0:*                   LISTEN

tcp        0      0 0.0.0.0:22                  0.0.0.0:*                   LISTEN

tcp        0      0 127.0.0.1:631               0.0.0.0:*                   LISTEN

tcp        0      0 127.0.0.1:25                0.0.0.0:*                   LISTEN

tcp        0      0 127.0.0.1:2207              0.0.0.0:*                   LISTEN

tcp        0    912 192.168.64.128:22           192.168.64.1:5610           ESTABLISHED

tcp        0      0 ::ffff:127.0.0.1:8005       :::*                        LISTEN

tcp        0      0 :::8009                     :::*                        LISTEN

tcp        0      0 :::8080                     :::*                        LISTEN

tcp        0      0 :::22

修改密码

[root@localhost local]# /usr/bin/mysqladmin -u root password '123456'

登陆mysql

[root@localhost /]# mysql -u root -p

Enter password:

赋予root用户远程登陆权限

mysql> grant all on *.* to root@'%' identified by '123456'

-> ;

重启mysql

[root@localhost /]# service mysql restart

Shutting down MySQL.                                       [纭甝

^[[?1;2cStarting MySQL..                                   [纭甝

使mysql不区分大小写 [root@localhost etc]# cd /usr/local/tomcat/bin/ [root@localhost etc]# vi my.cnf  [mysqld] datadir=/var/lib/mysql socket=/var/lib/mysql/mysql.sock user=mysql # Default to using old password format for compatibility with mysql 3.x # clients (those using the mysqlclient10 compatibility package). old_passwords=1 # Disabling symbolic-links is recommended to prevent assorted security risks; # to do so, uncomment this line: # symbolic-links=0 lower_case_table_names=1 添加行 lower_case_table_names=1 使mysql不区分大小写

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值