The Lazy Admin Blog

Home  /  CentOS • MySQL  /  Automated MySQL Installation

Automated MySQL Installation

April 14, 2016 CentOS, MySQL 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

Related Posts

  • Compiling PHP 5.2 on a CentOS 7 LiteSpeed Server

    Compiling PHP 5.2 on a CentOS 7 LiteSpeed Server

    1st October 2022
  • InnoDB: Failed to find tablespace for table `X` in the cache

    InnoDB: Failed to find tablespace for table `X` in the cache

    30th September 2022
  • Create MySQL database & user from cli

    Create MySQL database & user from cli

    14th April 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
Post Type Selectors
Filter by Categories
Apache
CentOS
CloudLinux
cPanel
Emails
ESXI
iSCSI
JetBackup
Linux
Litespeed
MySQL
NGINX
Oracle
Reduxio
Security
SSL
Uncategorized
VMware
Wordpress
XEN

Tags

apache aspx backup bash CentOS cloudlinux cPanel CXS Emails freetds google htaccess IMAP InnoDB iscsi JetBackup Libmodsecurity litespeed modsec modsecurity mssql MySQL netapp nginx odbc Oracle php php.ini phpselector rsync ssh ssmtp systemd threads VMFS WHM Wordpress xenserver

Popular Posts

  • Convert JetBackup to cPanel structure 6th October 2022
  • How To Install & Configure a Galera Cluster with MariaDB on Centos 7 6th February 2018
  • Allow a cPanel server to run a VHOST from multiple IP addresses 3rd April 2018
  • rsync without prompting for password 10th October 2022

Recent Posts

  • Understanding Why More Threads Can Sometimes Slow Down Performance 9th October 2024
  • Set up a new systemd service 18th May 2024
  • Bash Arrays 7th November 2023
  • rsync without prompting for password 10th October 2022

Recent Comments

  • Sven on rsync without prompting for password
  • TheLazyAdmin on rsync without prompting for password
  • Sven on rsync without prompting for password
  • TheLazyAdmin on Convert JetBackup to cPanel structure
  • Chris on Convert JetBackup to cPanel structure
Privacy Policy • Contact