![]() Review the list of server database files in the query execution results:.JOIN (SELECT * FROM sys.master_files WHERE type_desc = 'LOG' ) ldf Log_size = CAST((ldf.size * 8.0 / 1024) AS DECIMAL(8,2))įROM (SELECT * FROM sys.master_files WHERE type_desc = 'ROWS' ) mdf Upon connection, click “ New Query” and paste the following script into the query field:ĭb_size = CAST((mdf.size * 8.0)/1024 AS DECIMAL(8,2)),.If you do not want to re-type the password every time you connect to the server, tick Remember password. In the Authentication list box, choose your SQL Server Authentication method and specify the user credentials.In the Server name text box, type the name of the SQL cluster server.In the Server type list box, select Database Engine. ![]() On the File menu, click Connect Object Explorer.Start Microsoft SQL Server Management Studio (MSSMS).How to View SQL Server Database File Locations.If you do so, then re-create the mysql directory under /var/lib/ directory. Make sure not to delete the directory itself as the mysql.sock file will fail to create. You can now delete the mysql data from the /var/lib/mysql directory. After the server is reboot, MySQL will be accessing the data from the new location and all new databases will be created in the new directory. You will have to reboot the server to start the MySQL server. If the MySQL service does not start and you encounter an error like “ERROR! MySQL manager or server PID file could not be found!”, do not panic. ![]() Restart mysql so it is on the new partition Ignore any error encountered while doing creating the symbolic links. Ln -s /home/mysql/mysql.sock /var/lib/mysql/mysql.sock rm -rf /tmp/mysql.sock ln -s /home/mysql/mysql.sock /tmp/mysql.sock Now we need to setup the mysql.sock so that it operates correctly Rsync -vrplogDtH /var/lib/mysql/ /home/mysql/ We can run the command to copy more than two times in case we feel that the data may have changed during the second copy. Notice that we do the copy twice, that is because moving large data can take some time and there are high chances that some records in some databases are updated during the copying. Now we are going to copy all of the data to the new partition. Assign the mysql user and group permission to the new mysql directory. Now, create the mysql directory under your desired partition. Pid-file = /home/mysql/mysqld.pid socket = /var/lib/mysql/mysql.sock You can use any editor of your choice.Īdd the following in the /etc/my.cnf file under the mysqld section and save the file We can do that with a few easy steps.įirst of all we will edit the my.cnf file which is the MySQL configuration file. We simply move the MySQL data directory to a larger partition which can be either the /home partition or a new hdd. Fortunately, there is a handy solution to address this issue. But they usually forget that MySQL stores all the data in the /var/lib/mysql directory which fills up quickly as the number and size of the MySQL databases increase. Linux Administrators normally set the size of the /var partition enough to store all the logs. Since the /home partition stores the website data, it has to be allocated the largest size. It is always tricky to set the size of the /var partition while installing Linux for cPanel.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |