Jetserver – The Lazy Admin Blog
Home  /  CentOS • MySQL  /  Automated MySQL Installation

Automated MySQL Installation

elialum April 14, 2016 Leave a Comment

Here is a nice “Copy & Paste” script that you can use for installing MySQL.
This script skips the “mysql_secure_installation” part, in which you need to answer questions, and simply inserts all the needed information directly into the database.

This script was tested under Linux CentOS 7, and is using the Yum repository for installation.

yum install  -y --nogpgcheck  http://dev.mysql.com/get/mysql57-community-release-el7-7.noarch.rpm
sed -i 's/enabled=1/enabled=0/g' /etc/yum.repos.d/mysql-community.repo 
yum --nogpgcheck install mysql-community-server --enablerepo=mysql56-community -y
 
 
/etc/init.d/mysqld start
 
GENERATE_MYSQL_ROOT_PASSWORD=`date +%s | sha256sum | base64 | head -c 12 ; echo`
DATABASE_PASS="$GENERATE_MYSQL_ROOT_PASSWORD"
 
mysql -u root < /root/.my.cnf
Tags: CentOS, MySQL
Previous Article
Next Article

About Author

elialum

Related Posts

  • Create MySQL database & user from cli

    Create MySQL database & user from cli

    April 14, 2016
  • Install CXS on clean CentOS

    Install CXS on clean CentOS

    April 12, 2016

Leave a Reply

Cancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Search Our Blog

Generic selectors
Exact matches only
Search in title
Search in content
Search in posts
Search in pages
Filter by Categories
Apache
CentOS
CloudLinux
cPanel
ESXI
iSCSI
JetBackup
Litespeed
MySQL
NGINX
Reduxio
SSL
Uncategorized
VMware
Wordpress
XEN

Tags

apache aspx backup CentOS cloudlinux cPanel CXS freetds google htaccess iscsi JetBackup Libmodsecurity litespeed modsec modsecurity mssql MySQL netapp nginx odbc php php.ini phpselector VMFS WHM xenserver

Popular Posts

  • How To Install & Configure a Galera Cluster with MySQL on Centos 7 February 6, 2018
  • Allow a cPanel server to run a VHOST from multiple IP addresses April 3, 2018
  • Libmodsecurity installation April 14, 2016
  • JetBackup Cheat Sheet :: Automatically Acknowledge Alerts November 15, 2018

Recent Posts

  • Dealing with aggressive bot scanners September 14, 2020
  • Litespeed Geo Location Redirect September 14, 2020
  • JetBackup :: Restore on steroids ! August 21, 2020
  • XENSERVER :: CONNECTING ISCSI SR NETAPP STORAGE September 4, 2019

Recent Comments

  • Khan on Allow a cPanel server to run a VHOST from multiple IP addresses
  • Khan on Allow a cPanel server to run a VHOST from multiple IP addresses
  • Oleg Drabkin on Allow a cPanel server to run a VHOST from multiple IP addresses
  • Khan on Allow a cPanel server to run a VHOST from multiple IP addresses
  • Daniel on How To Install & Configure a Galera Cluster with MySQL on Centos 7
אחסון אתרים | JetApps