MariaDB yum源配置方法
时间:2015-01-10 20:12 来源:linux.it.net.cn 作者:IT
1. 配置yum源,在/etc/yum.repos.d/下创建MariaDB.repo文件,内容如下(根据操作系统实际情况选择):
# MariaDB 5.5 CentOS5-x86
# MariaDB 5.5 CentOS repository list – created 2013-08-08 08:08 UTC
# http://mariadb.org/mariadb/repositories/
[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/5.5.32/centos6-x86
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1
# MariaDB 5.5 CentOS5-amd64
# MariaDB 5.5 CentOS repository list – created 2013-08-08 08:08 UTC
# http://mariadb.org/mariadb/repositories/
[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/5.5.32/centos5-amd64
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1
# MariaDB 5.5 CentOS6-x86
# MariaDB 5.5 CentOS repository list – created 2013-08-08 08:08 UTC
# http://mariadb.org/mariadb/repositories/
[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/5.5.32/centos6-x86
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1
# MariaDB 5.5 CentOS6-amd64
# MariaDB 5.5 CentOS repository list – created 2013-08-08 08:08 UTC
# http://mariadb.org/mariadb/repositories/
[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/5.5.32/centos6-amd64
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1
2. YUM安装MariaDB 5.5.32,命令如下:
yum install MariaDB-server MariaDB-client
3. 启动MariaDB服务器,命令如下:
service mysql start
4. 设定数据库服务器管理员密码:
SET PASSWORD FOR ‘root’@'localhost’ = PASSWORD(‘root_password’);
5. 删除不安全的数据库账户,命令如下:
use mysql;
delete from user where user=”" or password=”";
6. 修改数据库账户用户密码,命令如下:
mysqladmin -u root -p password New_password
Enter Old_password
(责任编辑:IT)
1. 配置yum源,在/etc/yum.repos.d/下创建MariaDB.repo文件,内容如下(根据操作系统实际情况选择):
# MariaDB 5.5 CentOS5-x86
# MariaDB 5.5 CentOS5-amd64
# MariaDB 5.5 CentOS6-x86
# MariaDB 5.5 CentOS6-amd64
5. 删除不安全的数据库账户,命令如下: |