MariaDB升级到10.1.22

yum -y install cmake 安装 cmake 工具
执行 cmake 命令进行编译
cmake . -DCMAKE_INSTALL_PREFIX=/usr/local/mariadb
-DMYSQL_DATADIR=/var/data/mariadb
-DMYSQL_UNIX_ADDR=/tmp/mysql.sock
-DWITH_XTRADB_STORAGE_ENGINE=1
-DWITH_INNOBASE_STORAGE_ENGINE=1
-DWITH_PARTITION_STORAGE_ENGINE=1
-DWITH_BLACKHOLE_STORAGE_ENGINE=1
-DWITH_MYISAM_STORAGE_ENGINE=1
-DDEFAULT_CHARSET=utf8
-DDEFAULT_COLLATION=utf8_general_ci
-DEXTRA_CHARSETS=all
-DENABLED_LOCAL_INFILE=1
-DWITH_READLINE=1
-DWITH_EXTRA_CHARSETS=1
-DWITH_SSL=bundled
-DWITH_ZLIB=bundled
报错信息:
cc: internal compiler error: Killed (program cc1)
或者
g++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
 
主要原因大体上是因为 内存不足,有点坑 临时使用交换分区来解决吧
创建 swap 交换分区
dd if=/dev/zero of=/swapfile bs=64M count=16
mkswap /swapfile
swapon /swapfile
下面是执行 make 命令过程中内存使用情况
结束后可以关闭交换分区
swapoff /swapfile
rm /swapfile
初始化数据库(进入到scripts目录下)
./mysql_install_db --user=mysql --basedir=/usr/local/mariadb --datadir=/var/data/mariadb
下面是初始化完成后提示的信息:
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 MariaDB root USER !
To do so, start the server, then issue the following commands:

'/usr/local/mariadb/bin/mysqladmin' -u root password 'new-password'
'/usr/local/mariadb/bin/mysqladmin' -u root -h iZ287rk6ob4Z password 'new-password'

Alternatively you can run:
'/usr/local/mariadb/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 MariaDB Knowledgebase at http://mariadb.com/kb or the
MySQL manual for more instructions.

You can start the MariaDB daemon with:
cd '/usr/local/mariadb' ; /usr/local/mariadb/bin/mysqld_safe --datadir='/var/data/mariadb'

You can test the MariaDB daemon with mysql-test-run.pl
cd '/usr/local/mariadb/mysql-test' ; perl mysql-test-run.pl

Please report any problems at http://mariadb.org/jira

The latest information about MariaDB is available at http://mariadb.org/.
You can find additional information about the MySQL part at:

启动数据库
将 support-files 下的 my.small.cnf 复制到 /etc/ 下改名为 my.cnf,并修改相应的配置信息
./bin/mysqld --user=mysql
修改 root 密码
./bin/mysqladmin -u root password 'new-password'
恢复备份,下面两步需要登录 MySQL
导入备份数据
source back.sql;
刷新权限
flush privileges;
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值