[root@e3 mariadb-10.0.15]# /etc/init.d/mysqld.multi start 1,2,3
[root@e3 mariadb-10.0.15]# netstat -antlp |grep mysqld
tcp 0 0 :::3307 :::* LISTEN 20628/mysqld
tcp 0 0 :::3308 :::* LISTEN 20630/mysqld
tcp 0 0 :::3306 :::* LISTEN 20619/mysqld
[root@e3 mariadb-10.0.15]# /etc/init.d/mysqld.multi stop 1,2,3
[root@e3 mariadb-10.0.15]# netstat -antlp |grep mysqld
如何连接数据库
[root@e3 tmp]# mysql -S /tmp/mysql3307.sock 这样可以连接
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 2
Server version: 10.0.15-MariaDB Source distribution
Copyright (c) 2000, 2014, Oracle, SkySQL Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MariaDB [(none)]>
[root@e3 tmp]# mysql -uroot -h127.0.0.1 -P3306 -p 这样也可以连接
Enter password:
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 3
Server version: 10.0.15-MariaDB Source distribution
Copyright (c) 2000, 2014, Oracle, SkySQL Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MariaDB [(none)]>
以此类推。
在 CentOS/RHEL/Scientific Linux 6 下安装 LAMP (Apache with MariaDB and PHP)
Ubuntu 上如何将 MySQL 5.5 数据库迁移到 MariaDB 10