您好,欢迎访问一九零五行业门户网

linux下快速安装MariaDB_MySQL

mariadb
bitscn.com linux下快速安装mariadb
mariadb 是 一个采用 maria 存储引擎的  mysql  分支版本,是由原来 mysql 的作者 michael widenius 创办的公司所开发 的免费开源的数据库服务器 。
本文介绍了在linxu下一个简单的安装 方法(在opensuse下测试成功): 
下载页面: https://downloads.mariadb.org/mariadb/5.5.31/ 
# tar zxvf mariadb-5.5.31-linux-x86_64.tar.gz # mv mariadb-5.5.31-linux-x86_64 /usr/local/mysql # groupadd mysql 增加 mysql 属组 # useradd -g mysql mysql 增加 mysql 用户 并归于mysql 属组 # chown mysql:mysql -rf /usr/local/mysql 设置 mysql 目录的用户及用户组归属。 # chmod +x -rf /usr/local/mysql 赐予可执行权限 # cp /usr/local/mysql/support-files/my-medium.cnf /etc/my.cnf 复制默认mysql配置 文件到/etc 目录 # /usr/local/mysql/scripts/mysql_install_db --user=mysql 初始化数据 库 # cp /usr/local/mysql/support-files/mysql.server /etc/init.d/mysql 复制mysql服务程序 到系统 目录 # chkconfig mysql on 添加mysql 至系统服务并设置为开机启动 # service mysql start 启动mysql#vim /etc/profile 编辑profile,将mysql的可执行路径加入系统pathexport path=/usr/local/mysql/bin:$path #source /etc/profile 使path生效。#mysqladmin -u root password 'yourrootpassword' 设定root账号及密码#mysql -uroot -p 使用root用户登录mysql[none]>use mysql 切换至mysql数据库。[mysql]>select user,host,password from user; --查看系统权限[mysql]>drop user ''@'localhost'; --删除不安全的账户[mysql]>drop user root@'::1';[mysql]>drop user root@127.0.0.1;。。。[mysql]>select user,host,password from user; --再次查看系统权限,确保不安全的账户均被删除。
bitscn.com
其它类似信息

推荐信息