Please, God, someone help me!!!! Big Problems!
OK, my linux server came with preinstalled partitions. The main one has 15GIG data on it. There is another one that has 135 gigs.
The main one houses the website and the mysql databases. It is running out of space quickly. I tried to create a symbolic link and transfer the mysql folder to the bigger partition. When I do this, I can't restart mysqld, and the system cannot find the symbolic link to the data files. Another option, I guess, is that I can increase partition space by stealing from the big partition. I have no idea how to do this. Can someone help me figure out why the symbolic link is not working, or help me get more space on my main partition from the other huge one? |
Welcome to LQ.
Why are you trying to use a symlink? Is there a reason you don't just move the data and point mysql to the new data directory? |
Thank you for the welcome - and the quick response.
The answer to your question is that I don't know how to move the files and get it to work. I tried moving the entire /var folder to the new partition, but the server froze. I am working on this remotely, and not too comfortable with Linux. |
Also, I tried moving the mysql folder (which is the main problem for the space issue) to the data0 folder:
/var/lib/mysql moved to /data0/var/lib/mysql Then I tried creating the symlink to point to the new mysql folder. it shows that it works, but i cannot connect. |
I wouldn't mess about with moving all of /var when the system is in anything but single user mode.
I would just move (well, copy to start with) the mysql data (stop the service first): cp -ar /var/lib/mysql /data0/var/lib/mysql Then make sure the permissions are correct: chown -R mysql /data0/var/lib/mysql Then edit /etc/my.cnf to have a mysqld section with a datadir value: Code:
[mysqld] After the change just start the mysql service up again. |
I think you may have just saved my life. I am going to do this and see if it works. if it does, I need your address so I can come suffocate you with hugs!
:) |
OK, it didn't work.
Here is the my.conf file: [mysqld] datadir=/data0/var/lib/mysql socket=/var/lib/mysql/mysql.sock # Default to using old password format for compatibility with mysql 3.x # clients (those using the mysqlclient10 compatibility package). old_passwords=1 [mysql.server] user=mysql basedir=/data0/var/lib [mysqld_safe] err-log=/var/log/mysqld.log pid-file=/var/run/mysqld/mysqld.pid I am getting a timeout error when trying to restart mysqld service. |
service mysqld start
Timeout error occurred trying to start MySQL Daemon. Starting MySQL: [FAILED] |
What distribution are you using? Are you using SELinux?
What do you see in /var/log/mysqld.log? |
I am using Linux enterprise edition. In my var/log/mysqld.log, this is what's written:
050510 11:43:20 [Note] /usr/libexec/mysqld: Normal shutdown 050510 11:43:20 InnoDB: Starting shutdown... 050510 11:43:23 InnoDB: Shutdown completed; log sequence number 0 43664 050510 11:43:23 [Note] /usr/libexec/mysqld: Shutdown complete 050510 11:43:23 mysqld ended 050510 11:43:55 mysqld started 050510 11:43:55 [Warning] Can't create test file /data0/var/lib/mysql/65-42-106-1.lower-test /usr/libexec/mysqld: Can't change dir to '/data0/var/lib/mysql/' (Errcode: 13) 050510 11:43:55 [ERROR] Aborting 050510 11:43:55 [Note] /usr/libexec/mysqld: Shutdown complete 050510 11:43:55 mysqld ended |
RedHat Linux Enterprise? Which version?
Are you using SELinux? Can you post the output from: ls -la /data0/var/lib/mysql |
no longer necessary
|
I believe it is SELinux
|
If you are using SELinux I would reccomend reading the documentation so you can check the policy you have configured for mysql:
http://www.redhat.com/docs/manuals/e...selinux-guide/ |
The server came already configured. I will check this, but I am not sure what to check for.
|
All times are GMT -5. The time now is 11:05 AM. |