473,748 Members | 6,370 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 3950

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

Similar topics

0
3341
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 Domain %CPU %MEM Mysql Processes mysql 100.98 161.94 0.0 Top Process %CPU 24.3 /usr/sbin/mysqld --basedir/ --datadir/var/lib/mysql --usermysql --pid-file/var/lib/mysql/s1.critticage.com.pid --skip-locking
0
2519
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 is change the datadir in /etc/mysql/my.cnf from /var/lib/mysql to /DB. I attempted this as follows:
0
2330
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 "/usr/bin/mysqld_safe --skip-grant-tables &" I show several mysqld procs. and one mysqld_safe, but I can't connect: # ps -aux| grep mysql Warning: bad syntax, perhaps a bogus '-'? See http://procps.sf.net/faq.html root 3650 0.0 0.1 2276 664 ? S ...
0
1431
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 finally resorted to building Perl from sources once I have given up with trying to make the RedHat supplied Perl work well (using CPAN a lot here).. I have also downloaded the pre-built binaries for MySQL AMD-64 from the MySQL website. Now CPAN...
1
2389
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 --------------- bash START -------------- $ uname -a Linux localhost.localdomain 2.6.8-1.521 #1 Mon Aug 16 09:01:18 EDT
0
1884
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 doesn't recognize me being logged in as root (via CURRENT_USER().) Here it is, line-by-line. Inline comments are denoted by '//'
16
27922
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 own LAN, the driver tells me it cannot make the connection. Here are the ODBC driver connection parms: Data Source Name: (free field - name my "my linux box" will do nicely) Host/Server Name (or IP) - something like MSQLUserName@ServerName.net...
1
3379
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 uses his own php shopping cart to receive customer orders. The configuration was done via cPanel with no external modifications - which produced no protests when built, ran and connected with no
3
5768
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 drive onto a USB External Hard Drive. I have to assume I also copied the data. I
0
8830
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9544
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9372
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9324
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9247
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6796
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6074
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4606
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4874
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.