Toggle navigation
Home
安装部署
Archives
Tags
Mysql Deployment
2019-06-17 12:09:20
40
0
0
louyj
# Download Binary wget https://cdn.mysql.com//Downloads/MySQL-5.7/mysql-5.7.26-el7-x86_64.tar.gz tar zxvf mysql-5.7.26-el7-x86_64.tar.gz # Init Database mysql_install_db --basedir=/usr/local/mysql --datadir=/data/mysql mysqld --initialize --basedir=/usr/local/mysql --datadir=/data/mysql --user=pgdata  # Configuration default config file mysqld --verbose --help |grep -A 1 'Default options' configure mysql ``` vi /etc/my.cnf [mysqld] basedir=/usr/local/mysql datadir=/data/mysql port=20769 user=pgdata socket=/data/mysql/mysql.sock # Disabling symbolic-links is recommended to prevent assorted security risks symbolic-links=0 # Settings user and group are ignored when systemd is used. # If you need to run mysqld under a different user or group, # customize your systemd unit file for mariadb according to the # instructions in http://fedoraproject.org/wiki/Systemd [mysqld_safe] log-error=/data/mysql/mariadb.log pid-file=/data/mysql/mariadb.pid # # include all files from the config directory # !includedir /etc/my.cnf.d ``` # Start Database cp -v /usr/local/mysql/support-files/mysql.server /etc/init.d/ chkconfig --add mysql.server service mysql.server start # post install change root password mysqladmin -u root -p password Mingjueinfo2015_db connect to server mysql -u root -p change mysql root username mysql > update user set user='pgdata' where user='root'; service mysql.server restart enable remote login for root user GRANT ALL PRIVILEGES ON *.* TO 'pgdata'@'%' IDENTIFIED BY 'Mingjueinfo2015_db' WITH GRANT OPTION; FLUSH PRIVILEGES; ssh -i /home/gpadmin/.ssh/id_rsa -L *:20769:localhost:20769 -Nf root@47.103.86.28
Pre:
Symmetricds
Next:
Kubernetes部署
0
likes
40
Weibo
Wechat
Tencent Weibo
QQ Zone
RenRen
Submit
Sign in
to leave a comment.
No Leanote account?
Sign up now.
0
comments
More...
Table of content
No Leanote account? Sign up now.