473,320 Members | 2,117 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Can't Move MySQL Datadir

Hi there, I want to do something ridiculously simple and naturally
MySQL is presenting me with problems that the manual doesn't even hint
at.

Platform is Debian Linux 2.4.21

All I want to do is change the datadir in /etc/mysql/my.cnf from
/var/lib/mysql to /DB.

I attempted this as follows:
1. Shut down mysql ( /etc/init.d/mysql stop )

Shuts down fine

2. Modify /etc/mysql/my.cnf

datadir = /DB
#datadir = /var/lib/mysql

3. Copied the contents with permissions preservation from
/var/lib/mysql to /DB

4. Restarted MySQL... Guess what, it doesn't work.
---------------------------------------------------
# /etc/init.d/mysql start
Starting MySQL database server: mysqld...failed.
---------------------------------------------------
Sez it failed but the processes are running:

root 2383 0.0 0.0 1996 976 pts/3 S 17:20 0:00 /bin/sh
/usr/bin/safe_mysqld
mysql 2418 0.0 0.1 36592 4440 pts/3 S 17:20 0:00
/usr/sbin/mysqld --basedir=/usr --datadir=/DB --user=mysql
--pid-file=/var/run/mysqld/mysqld.pid --skip-locking
mysql 2420 0.0 0.1 36592 4440 pts/3 S 17:20 0:00
/usr/sbin/mysqld --basedir=/usr --datadir=/DB --user=mysql
--pid-file=/var/run/mysqld/mysqld.pid --skip-locking
mysql 2421 0.0 0.1 36592 4440 pts/3 S 17:20 0:00
/usr/sbin/mysqld --basedir=/usr --datadir=/DB --user=mysql
--pid-file=/var/run/mysqld/mysqld.pid --skip-locking
mysql 2422 0.0 0.1 36592 4440 pts/3 S 17:20 0:00
/usr/sbin/mysqld --basedir=/usr --datadir=/DB --user=mysql
--pid-file=/var/run/mysqld/mysqld.pid --skip-locking

-----------------------------

If I try to connect, it sez I don't have permissions:

ERROR 1045: Access denied for user: 'root@localhost' (Using password:
NO)
It's as if the mysql DB is missing, but it's not it's in the right
place (/DB) with all the right permissions.

All the instructions I can find on the web say I did what I was
supposed to. If I change the datadir back and restart everything is
fine. The MySQL manual was no help. Can someone please give me some
ideas?
Jul 19 '05 #1
0 2506

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Evan Barter | last post by:
I've noticed a server running with a higher load recently and I believe I've narrowed it down to mySQL. Taking a look at Cpu/Memory/Mysql Usage History in WebHost Manager I notice this: User ...
2
by: Miguel Perez | last post by:
Hi every one: I have the followin error just after mysql starts: "/usr/bin/safe_mysqld: line 280: 17018 Killed $NOHUP_NICENESS $ledir/$MYSQLD $defaults --basedir=$MY_BASEDIR_VERSION...
0
by: flubdgub | last post by:
Hi there, I want to do something ridiculously simple and naturally MySQL is presenting me with problems that the manual doesn't even hint at. Platform is Debian Linux 2.4.21 All I want to do...
0
by: Mark Adams | last post by:
I really need some help with this. MySQL will not start on boot despite everything I've done to make sure that it is set to do so. When I start it as root from a terminal with...
0
by: Arthur Perry | last post by:
Hello, I am having this problem that is just driving me crazy.. When using Bugzilla with Mysql (all Mysql, Perl, and modules all supplied by RedHat for RHEL 3.0), MYSQL hangs frequently. I have...
1
by: Maxim. V. | last post by:
Hello to everone, As mentioned in this *guide(1), i've compiled mysql on my fedora Core 2 system, with the following spec's : *(1) http://hulan.info/blog/index.php?itemid=576 ...
0
by: ./Rob & | last post by:
Hi gang: I'm experiencing a problem with MySQL -- I updated MySQL from version 4.1.0 to 4.1.10 and now when I login as root it doesn't show all the databases I should have access to, nor it...
16
by: MLH | last post by:
Using MS Access, I have attached to MySQL servers in other states and other countries on the other side of my router. But when I use the MySQL ODBC driver 3.51 to connect to a MySQL server on my...
1
by: jlee | last post by:
I'm pretty much a newbie on mysql, and I need some help. I am running mysql Ver 12.22 Distrib 4.0.24, for portbld-freebsd5.4 (i386) on a server hosting an active website. The site's developer...
3
by: eieiohh | last post by:
MySQL 3.23.49 PHP 4.3.8 Apache 2.0.51 Hi All! Newbie.. I had a CRM Open Source application installed and running. Windows Xp crashed. I was able to copy the contents of the entire hard...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.