Solved

Server Administartion Server Instances

Posted on 2012-04-01
8
1,435 Views
Last Modified: 2012-04-02
I’m new to My SQL. Im trying to trying to change the Data directory location to that of the server Instead of the default C:Program Data/MySQL/MySQL Server 5.5/data. I changed the my.ini file so that the database directory was pointing to the server and then stopped the database server and tried to restart the database. It would not re-start.. I copied the old my.ini file back and the database restarted. I thought, well maybe it can not find the same dabases in the new directory that I had in old directory , so I copied the entired database structure and tried the new my.ini database file again  and it still would not restart after I stopped it. ANy suggestions?

Thanks,
Mike
0
Comment
Question by:miker454
  • 4
  • 3
8 Comments
 
LVL 7

Expert Comment

by:barlet
ID: 37794051
Hello miker54,

First I would say, you posted MySQL related question in SQL Server zone...

have a look at the link below for your question...
http://www.opensourcevarsity.com/mysqlbasics/l4changingappldatadirpath
0
 
LVL 76

Expert Comment

by:arnold
ID: 37794196
Could you detail what you mean by pointing it to the server?
Make sure that the settings where they are originally matches the new location.
There should be an error log that will include the reason why it could not start.
You hav to copy all the directories in the data folder to h new location and not just some.
You could reconfigure and alter the data location.
0
 

Author Comment

by:miker454
ID: 37794349
Hi Barlet,

I appreciate the link and the suggestion of switching categories. I followed the procedure of this and other links. The problem is I did modify the file, so that the data directory is  datadir="Y:\dev224\MySQL\data" .I copied the original data directory using the windows explorer. I do see a directory when I sign up to the original configuration that i don't see in the actual directory  information_schema . But I copied the directory and stopped the Server and tried to restart, but it would not restart.

Thanks,
Mike
0
 
LVL 76

Accepted Solution

by:
arnold earned 500 total points
ID: 37794375
What is the error in the log file?  Do the permissions on the new location match the ones at the original?
cacls c:\program files\mysql...\data
0
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 

Author Comment

by:miker454
ID: 37794729
Firt of all thanks to arnold and  barlet for trying to help. I decided to try to isolate the problem by simply changing the database root from the default "C:\ProgramData\MySQL\MySQL Server 5.5\data\" to "C:\ProgramData\MySQL\data\" . So I copied the data directory to the C:\ProgramData\MySQL\ and then tried to stop and start the My SQL database community version. I was able to start and stop and it runs fine. Tried switching the data directory to another phisical hard drive in the computer e:\My SQL\data. Stopped and started and it ran fine. Tried to put the data on a Server drive mapped on the client computer z:\MySQL\data and it would not start. I tried giving the directories all the permissions, but I could not get it to run. This is the My SQL community version 5.2.22 .  Is there something i need to do to the file server to allow me to access the database files at the client machine. I run paradox tables of the file server without any problems.

2012-04-02 02:42:21 - Workbench will use cmd shell commands to start/stop this instance
2012-04-02 02:42:21 - Status check of service 'MySQL55' returned stopped
2012-04-02 02:42:21 - Status check of service 'MySQL55' returned stopped
2012-04-02 02:42:27 - Status check of service 'MySQL55' returned stopped
2012-04-02 02:42:27 - Starting server...
2012-04-02 02:42:29 - Status check of service 'MySQL55' returned stopped
2012-04-02 02:42:29 - Server start done.
2012-04-02 02:42:29 - Status check of service 'MySQL55' returned start pending
2012-04-02 02:42:44 - Status check of service 'MySQL55' returned stopped
2012-04-02 02:42:44 - Starting server...
2012-04-02 02:42:46 - Status check of service 'MySQL55' returned stopped
2012-04-02 02:42:46 - Server start done.
2012-04-02 02:42:46 - Status check of service 'MySQL55' returned start pending


Im running MySQL 5.5.22 on windows 7 . The server runs server 2008.



Thanks,
Mike
0
 
LVL 76

Expert Comment

by:arnold
ID: 37794752
Instead of using mapped drives, see whether you can configure space on the server that can be accessed by the system using iscsi
http://technet.microsoft.com/en-us/edge/Video/ff710316
http://technet.microsoft.com/en-us/library/cc772367.aspx

Any reason why you are not running the MySQL server on the server?
0
 

Author Comment

by:miker454
ID: 37798697
Thanks to both of you for helping. I'm going to close this question and consider it answered. I stupidly tried to run the My SQL on the client machines and use the file server to store the data. Obviously, this won't work (lowers head in shame!!). In my defence I spend hours trying to get My SQL to work on the server computer and I could not even see it on the client computers. Thanks for the help. I posted the question I should have asked on the My SQL section. By the way this is it:


Installed MySQL Server 5.2.22 on a Windows 2008 server. Using the MySQL workbench 5.2 cummunityt edition, the database is working on the server and I can actually log into it via ODBC on the server computer. I have tried to log on the MySQL server on windows 7 client machine using ODBC and it will not see the My SQL server. I have disabled the windows firewall on both the server and the client and I still can not see the My SQL server on the client machine. Openned port 3306 and nothing.
Any suggestions?

Thanks,
Mike
0
 
LVL 76

Expert Comment

by:arnold
ID: 37798758
You need to first to configure MySQL to listen for tcp/ip connections.
You the have to use the advanced firewall settings and open the port you configured in the prior to allow access from the private/domain network.
0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

I wrote this interesting script that really help me find jobs or procedures when working in a huge environment. I could I have written it as a Procedure but then I would have to have it on each machine or have a link to a server-related search that …
Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
Via a live example combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now