• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 229
  • Last Modified:

Please Help with Symbolic Link - going crazy!

I have 2 partitions - one is the main: / and one is called data0

The main one holds the website and the mysql databases, but has run out of space - it only has 15GIGS total.

The data0 partition has 130GIGS available.

I moved the folder called:  

/var/lib/mysql

to

/data0/var/lib/mysql and created a symbolic link.  However, it is not reading the link and I am getting errors when trying to connect to my new mysql databases.

I also geta time out error when trying to restart mysqld service.

Please tell me what I am doing wrong!!!!!
0
foreverdita
Asked:
foreverdita
  • 6
  • 4
1 Solution
 
MikeOM_DBACommented:

Did you use the '-s' option when creating the link?

Under /var/lib create link as:

ln -s /data0/var/lib/mysql mysql

0
 
foreverditaAuthor Commented:
I used mc to create the symlink
0
 
MikeOM_DBACommented:

What is mc?
Which OS are we talking about?

The 'ln' command works for almost all *nix flavored OS's
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
foreverditaAuthor Commented:
I am getting the timeout error when i try to restart mysqld with the symbolic link in place, and when i try to connect via phpmysqladmin, I get a #2013 - Lost connection to MySQL server during query.  Mysqld is stopped and cannot be restarted with the symbolic link.  

Could this be a permissions error?  How could I check that?  Is there some other possible reason for this error?  
0
 
foreverditaAuthor Commented:
I tried the ln -s /data0/var/lib/mysql mysql as well.

It shows the link is in place.

But mysqld will not restart through the link.

Linux enterprise is what I am using.

0
 
foreverditaAuthor Commented:
The symbolic link is showing the owner as root, while the actual mysql folder is showing mysql as the owner.  Could this be a problem, and if so, how can I fix it?
0
 
MikeOM_DBACommented:
Assuming mysql is the owner and dba is the group, try this:

chown mysql:dba mysql

If you type ls -l you should see something like this:

lrwxrwxrwx   1 mysql  dba      9  May 10  13:52 mysql -> /data0/var/lib/mysql



0
 
foreverditaAuthor Commented:
chown: `mysql:dba': invalid group

I am getting this error when i try to do the chown
0
 
foreverditaAuthor Commented:
Right now, the ls -l is:

lrwxrwxrwx    1 root    root     mysql -> /data0/var/lib/mysql

0
 
MikeOM_DBACommented:

When you tried the ln -s command, did you remove (rm) the previous link?
If not, remove and re-create the link with the ln -s command.

 
0

Featured Post

Get your Disaster Recovery as a Service basics

Disaster Recovery as a Service is one go-to solution that revolutionizes DR planning. Implementing DRaaS could be an efficient process, easily accessible to non-DR experts. Learn about monitoring, testing, executing failovers and failbacks to ensure a "healthy" DR environment.

  • 6
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now