Running the mysql.sh is not creating data in /var/lib/mysql


Enter Your Query:
Use '%' for wildcards and quotes for "exact phrases"


Top Level » MySQL / MariaDB

Running the mysql.sh is not creating data in /var/lib/mysqlLast Modified: Feb 16, 2019, 11:16 am
If you're trying to re-install MySQL/MariaDB, and are starting from scratch with the /usr/local/directadmin/scripts/mysql.sh, but it's not creating the mysql tables + data, this guide may be able to help.  If your solution is not listed here, please create a ticket for DirectAdmin Support, so we can investigate and add it here.

Check your output, and see if any of it matches up with the scenarios below:
  • Within the output:

    Data needs to be created in /var/lib/mysql/mysql ...
    Neither host 'server.host.com' nor 'localhost' could be looked up with
    '/usr/sbin/resolveip'
    Please configure the 'hostname' command to return a correct
    hostname.
    If you want to solve this at a later stage, restart this script
    with the --force option

    We've encountered this error before, even though the /etc/hosts did work correctly.  Solution to this one is to edit the mysql.sh and add --force to the end of the mysql_install_db line, making it look like this:

    /usr/bin/mysql_install_db --force

    where the --force option simply skips those dns checks.   DirectAdmin already makes sure that localhost exists in the /etc/hosts, so we're not concerned about these checks.   Note:  DirectAdmin 1.56.0 and up will use --force by default, so you'd only need to make this edit for older versions.

 
Related Helpfiles
How to re-install MySQL

© 2018 JBMC Software, Suite 173  3-11 Bellerose Drive, St Albert, AB  T8N 1P7  Canada.  Mon-Fri 9AM-5PM MST