yum mysql mariadb 目录_CentOS6.5上安装MariaDB

本文描述了从MySQL升级到MariaDB的过程,包括移除旧的MySQL包,安装新的MariaDB包,确保服务启动,并运行'mysql_upgrade'程序。升级过程中遇到了预安装脚本失败的问题,但最终成功安装了MariaDB客户端和一些依赖包。在启动MariaDB后,还展示了如何设置root用户的密码以及权限配置。
摘要由CSDN通过智能技术生成

' to remove the package which contains the mysqlclient shared library. The library will be reinstalled by the MariaDB-shared package. - Install the new MariaDB packages supplied by Monty Program AB - Ensure that the MariaDB server is started - Run the 'mysql_upgrade' program This is a brief description of the upgrade process. Important details can be found in the MariaDB manual, in the Upgrading section. ****************************************************************** error: %pre(MariaDB-server-5.5.36-1.el6.x86_64) scriptlet failed, exit status 1 error: install: %pre scriptlet failed (2), skipping MariaDB-server-5.5.36-1.el6 Installing : MariaDB-client-5.5.36-1.el6.x86_64 4/7 Erasing : mysql-5.1.71-1.el6.x86_64 5/7 Erasing : mysql-libs-5.1.71-1.el6.x86_64 6/7 Verifying : MariaDB-common-5.5.36-1.el6.x86_64 1/7 Verifying : MariaDB-compat-5.5.36-1.el6.x86_64 2/7 Verifying : MariaDB-client-5.5.36-1.el6.x86_64 3/7 Verifying : mysql-libs-5.1.71-1.el6.x86_64 4/7 Verifying : MariaDB-server-5.5.36-1.el6.x86_64 5/7 mysql-server-5.1.71-1.el6.x86_64 was supposed to be removed but is not! Verifying : mysql-server-5.1.71-1.el6.x86_64 6/7 Verifying : mysql-5.1.71-1.el6.x86_64 7/7 Installed: MariaDB-client.x86_64 0:5.5.36-1.el6 MariaDB-compat.x86_64 0:5.5.36-1.el6 Dependency Installed: MariaDB-common.x86_64 0:5.5.36-1.el6 Replaced: mysql.x86_64 0:5.1.71-1.el6 mysql-libs.x86_64 0:5.1.71-1.el6 Failed: MariaDB-server.x86_64 0:5.5.36-1.el6 mysql-server.x86_64 0:5.1.71-1.el6 Complete!

3、启动MariaDB

# /etc/init.d/mysqld start

Initializing MySQL database: WARNING: The host 'Cloud-Q2' could not be looked up with resolveip.

This probably means that your libc libraries are not 100 % compatible

with this binary MySQL version. The MySQL daemon, mysqld, should work

normally with the exception that host name resolving will not work.

This means that you should use IP addresses instead of hostnames

when specifying MySQL privileges !

Installing MySQL system tables...

OK

Filling help tables...

OK

To start mysqld at boot time you have to copy

support-files/mysql.server to the right place for your system

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 Cloud-Q2 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.

You can start the MySQL daemon with:

cd /usr ; /usr/bin/mysqld_safe &

You can test the MySQL daemon with mysql-test-run.pl

cd /usr/mysql-test ; perl mysql-test-run.pl

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

[ OK ]

Starting mysqld: [ OK ]

4、为MariaDB设置密码

# /usr/bin/mysqladmin -u root password 'adminadmin'

MySQL [(none)]> use mysql; MySQL [mysql]> update user set host='%' where user='root' and host='127.0.0.1'; MySQL [mysql]> grant all privileges on *.* to 'root'@'%' identified by 'adminadmin' with grant option; MySQL [mysql]> flush privileges;

# vi /etc/sysconfig/iptables

-A INPUT -m state --state NEW -m tcp -p tcp --dport 3306 -j ACCEPT

# service iptables restart

本文原创发布php中文网,转载请注明出处,感谢您的尊重!

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值