Skip to main content
Question

MySQL Database Location?


Forum|alt.badge.img+6

Trying to upgrade my JSS 9.98 to 9.100 and want to backup the database first. However, I can't seem to locate the database in order to backit up using the JSS Database Utility. I've looked in the database.xml as other's have suggested but there is no database path listed there. I'm running MySQL Server 5.7.

Any ideas?

5 replies

Forum|alt.badge.img+10
  • Valued Contributor
  • 111 replies
  • August 24, 2017

The default location for mySQL is /usr/local/mysql-xxx.xxx.-blahblahblah

The database should be in the data folder in that location


Forum|alt.badge.img+16
  • Honored Contributor
  • 403 replies
  • August 24, 2017

@sedwards why do you need the physical path of the database? The JSS database utility talks to the database over the network and dumps the data to a file. The only place where you should ever be asked to select a file path in the Database Utility is where to save the compressed database dump file.

The only information it needs for the database itself is the IP address and login credentials to the MySQL database itself. You should never be touching the actual raw database files.


sdagley
Forum|alt.badge.img+25
  • Jamf Heroes
  • 3536 replies
  • August 24, 2017

@sedwards As @chriscollins says you don't need to know where the MySQL database is on disk to back up your JSS database with the JSS Database Utility. If you really wanted to know though, on Windows it'd be at %PROGRAMDATA%MySQLMySQL Server 5.7


Forum|alt.badge.img
  • New Contributor
  • 1 reply
  • August 24, 2017

if you have a file /etc/my.cnf. If so, it should tell you where the data directory is. For example:

[mysqld]
set-variable=local-infile=0
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
user=mysql
...
My guess is that your mysql might be installed to /usr/local/mysql-XXX.


  • 0 replies
  • September 28, 2017

By default, the datadir is set to /var/lib/mysql in the /etc/mysql/mysql.conf.d/mysqld.cnf file. Edit this file to reflect the new data directory: sudo nano /etc/mysql/mysql.conf.d/mysqld.cnf

I hope it will be useful for you.


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings