Re: rescue Inno tables from an abandoned data directory?
Hi Martin, On 4/12/2016 07:23, Martin Mueller wrote: I abandoned a MySQL 5.22 database that quite suddenly andthat I wasn’t able to start up again. The data directory consists of a mix of ISAM and Inno tables. I was able to copy the ISAM tables into a new 5.6 version, and they work. Assuming you mean 5.5.22 or 5.6.22, then sometimes you can recover a table without partitions with its own .ibd file (file-per-table) using the transportable tablespace features: 1. Install a fresh copy of 5.6 2. Create the table (using a normal CREATE TABLE statement). If you don't know the table definition use mysqlfrm from MySQL Utilities (https://dev.mysql.com/doc/mysql-utilities/1.6/en/mysqlfrm.html) 3. Discard the tablespace (ALTER TABLE DISCARD TABLESPACE) 4. Copy the .ibd file (make sure you work with a copy) into the new 5.6 instance (e.g. for the table db1.t1 copy to /db1/t1.ibd) 5. Import the tablespace (ALTER TABLE IMPORT TABLESPACE) There is also an example in https://dev.mysql.com/doc/refman/5.7/en/innodb-transportable-tablespace-examples.html The import in step 5. will complain that there is no .cfg file from a proper tablespace copy, but InnoDB will do a best effort to import it, and I don't think I've seen it fail if the tablespace has been valid. Best regards, Jesper Krogh MySQL Support -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql
Re: rescue Inno tables from an abandoned data directory?
Hi Martin On 4/12/2016 07:23, Martin Mueller wrote: I abandoned a MySQL 5.22 database that quite suddenly andthat I wasn’t able to start up again. The data directory consists of a mix of ISAM and Inno tables. I was able to copy the ISAM tables into a new 5.6 version, and they work. I understand that INNO tables are different because different tables share a common table space. The MySQL documentation refers to a “cold backup,” where you copy the separate files after a “slow shutdown.” It doesn’t tell you what to do with them after you’ve put them in a “safe place.” The recommendation here is that if your DB is in an inconsistent state, the last thing you want to do is break it even further. The flat OS files copy of the DD simply gives us a fallback should our recover operations on the DD make matters worse, eg via innodb_force_recovery etc In my case, I can reproduce Time machine backups of data directories at varying times. At one point I was able to replace the non-working installation with an earlier installation, but then it failed unpredictably. The steps you took and an associated error log would assist me in assisting you. Also accurate information on the version helps, 5.5.22? 5.1.22 ? as mentioned there is no 5.22. In general this approach can be taken; If the DB successfully started , then your first port of call is to perform this action again with the same DD snapshot and attempt a logical dump of any tables you wish to recover. Without knowing what state the db is in , I would recommend starting with [mysqld] innodb_force_recovery = 1 read_only skip_slave_start https://dev.mysql.com/doc/refman/5.5/en/forcing-innodb-recovery.html https://dev.mysql.com/doc/refman/5.5/en/server-system-variables.html#sysvar_read_only https://dev.mysql.com/doc/refman/5.5/en/replication-options-slave.html#option_mysqld_skip-slave-start and seeing if you can access / dump the tables in question. If not , iterate through 2,3,4,5,6 ( in order! ) to see if that assists. If this doesn't work, try the latest version of the current tree you are on. ie if 5.5 https://dev.mysql.com/doc/relnotes/mysql/5.5/en/news-5-5-53.html failing that, hail mary it with latest 5.7, you may get lucky with TT https://dev.mysql.com/doc/refman/5.7/en/glossary.html#glos_transportable_tablespace GL Are the Inno tables on Time Machine useless, or can I rescue data from them? I’ll be grateful for help -- Regards Ronan McGlue MySQL Support
Re: rescue Inno tables from an abandoned data directory?
On 12/3/2016 14:23, Martin Mueller wrote: I abandoned a MySQL 5.22 database There's been 5.0m 5,1, 5,4 (briefly), 5.5, 5.6 and now 5.7. No 5,.2. that quite suddenly andthat I wasn’t able to start up again. The data directory consists of a mix of ISAM and Inno tables. You mean MyISAM? I was able to copy the ISAM tables into a new 5.6 version, and they work. I understand that INNO tables are different because different tables share a common table space. Not just that. The MySQL documentation refers to a “cold backup,” where you copy the separate files after a “slow shutdown.” It doesn’t tell you what to do with them after you’ve put them in a “safe place.” This refers to https://dev.mysql.com/doc/mysql-backup-excerpt/5.7/en/innodb-backup.html? Copy into identical folders on the new machine, or to corresponding folders named in a new my.cnf. In my case, I can reproduce Time machine backups of data directories at varying times. At one point I was able to replace the non-working installation with an earlier installation, but then it failed unpredictably. Are the Inno tables on Time Machine useless, or can I rescue data from them? Mysqlbackup (Enterprise) and Percona Xtrabackup are known to do reliable hot backups. PB - I’ll be grateful for help -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql
Re: rescue Inno tables from an abandoned data directory?
Am 03.12.2016 um 21:23 schrieb Martin Mueller: In my case, I can reproduce Time machine backups of data directories at varying times. At one point I was able to replace the non-working installation with an earlier installation, but then it failed unpredictably. Are the Inno tables on Time Machine useless, or can I rescue data from them? backup of files like innodb while the daemons are running is in general problemtaic, not only for time mahine, also for LVM snapsots hence we use for 10 years now replication slaves which are stopped, the datadir rsynced and the slave started again to avoid all that other stuff just for having a relieable and consistent snapshot -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql
rescue Inno tables from an abandoned data directory?
I abandoned a MySQL 5.22 database that quite suddenly andthat I wasn’t able to start up again. The data directory consists of a mix of ISAM and Inno tables. I was able to copy the ISAM tables into a new 5.6 version, and they work. I understand that INNO tables are different because different tables share a common table space. The MySQL documentation refers to a “cold backup,” where you copy the separate files after a “slow shutdown.” It doesn’t tell you what to do with them after you’ve put them in a “safe place.” In my case, I can reproduce Time machine backups of data directories at varying times. At one point I was able to replace the non-working installation with an earlier installation, but then it failed unpredictably. Are the Inno tables on Time Machine useless, or can I rescue data from them? I’ll be grateful for help
AW: --initialize specified but the data directory has files in it. Aborting.
Hi, you can check your file limits with $ ulimit -Hn $ ulimit -Sn The limits are configured in /etc/security/limits.conf If you google for it, you will find, how to set. After changing, new opend shells will have the new parameters. After changing them, your first error message " Changed limits: max_open_files: 1024 (requested 5000)" should be gone, maybe the next one too. Kind regards Axel -Ursprüngliche Nachricht- Von: jim Zhou [mailto:jim.jz.z...@gmail.com] Gesendet: Freitag, 13. November 2015 22:23 An: Reindl Harald Cc: mysql@lists.mysql.com Betreff: Re: --initialize specified but the data directory has files in it. Aborting. [root@deweyods1 ~]# cat /etc/redhat-release Red Hat Enterprise Linux Server release 6.6 (Santiago) On Fri, Nov 13, 2015 at 8:56 AM, Reindl Harald wrote: > > > Am 13.11.2015 um 17:46 schrieb Axel Diehl: > >> what kind of OS do you have? >> > > pretty sure Fedora/CentOS7 because "yum" and the package name, if i > would be him i would just install mariadb which is the default mysql > implementation these days on most linux distributions and hence the > packages are better maintained > > > -Ursprüngliche Nachricht- >> Von: jim Zhou [mailto:jim.jz.z...@gmail.com] >> Gesendet: Freitag, 13. November 2015 17:12 >> An: mysql@lists.mysql.com >> Betreff: --initialize specified but the data directory has files in it. >> Aborting. >> >> Hi, >> >> I did "yum install myswl-community-server" and "service mysqld start" >> I got the error >> >> Initializing MySQL database: 2015-11-13T15:54:01.203931Z 0 [Warning] >> Changed limits: max_open_files: 1024 (requested 5000) >> 2015-11-13T15:54:01.204205Z 0 [Warning] Changed limits: table_open_cache: >> 431 (requested 2000) >> 2015-11-13T15:54:01.204397Z 0 [Warning] TIMESTAMP with implicit >> DEFAULT value is deprecated. Please use >> --explicit_defaults_for_timestamp server option (see documentation for more >> details). >> 2015-11-13T15:54:01.207712Z 0 [ERROR] --initialize specified but the >> data directory has files in it. Aborting. >> 2015-11-13T15:54:01.207751Z 0 [ERROR] Aborting >> >> can someone help? >> > >
Re: --initialize specified but the data directory has files in it. Aborting.
Hello Jim, On 11/13/2015 11:12 AM, jim Zhou wrote: Hi, I did "yum install myswl-community-server" and "service mysqld start" I got the error Initializing MySQL database: 2015-11-13T15:54:01.203931Z 0 [Warning] Changed limits: max_open_files: 1024 (requested 5000) 2015-11-13T15:54:01.204205Z 0 [Warning] Changed limits: table_open_cache: 431 (requested 2000) 2015-11-13T15:54:01.204397Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details). 2015-11-13T15:54:01.207712Z 0 [ERROR] --initialize specified but the data directory has files in it. Aborting. 2015-11-13T15:54:01.207751Z 0 [ERROR] Aborting can someone help? thank you, Jim You attempted to install a new 5.7 on top of an existing set of data. Quoting from http://dev.mysql.com/doc/refman/5.7/en/server-options.html#option_mysqld_initialize This option is used to initialize a MySQL installation by creating the data directory and populating the tables in the mysql system database. That is why it told you that the folder it was attempting to use was not empty then stopped (aborted). It wasn't going to overwrite your existing system tables with the ones it needs to use. You could have used YUM to install an RPM or used a native YUM repo (you did not say). Did you also read this in the manual? http://dev.mysql.com/doc/refman/5.7/en/updating-yum-repo.html By default, the MySQL Yum repository updates MySQL to the latest version in the release series you have chosen during installation (see Selecting a Release Series for details), which means, for example, a 5.6.x installation will NOT be updated to a 5.7.x release automatically. There is a link in that page that points you to this other very important page: http://dev.mysql.com/doc/refman/5.7/en/upgrading-from-previous-series.html Does this help? -- Shawn Green MySQL Senior Principal Technical Support Engineer Oracle USA, Inc. - Integrated Cloud Applications & Platform Services Office: Blountville, TN Become certified in MySQL! Visit https://www.mysql.com/certification/ for details. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql
Re: --initialize specified but the data directory has files in it. Aborting.
[root@deweyods1 ~]# cat /etc/redhat-release Red Hat Enterprise Linux Server release 6.6 (Santiago) On Fri, Nov 13, 2015 at 8:56 AM, Reindl Harald wrote: > > > Am 13.11.2015 um 17:46 schrieb Axel Diehl: > >> what kind of OS do you have? >> > > pretty sure Fedora/CentOS7 because "yum" and the package name, if i would > be him i would just install mariadb which is the default mysql > implementation these days on most linux distributions and hence the > packages are better maintained > > > -Ursprüngliche Nachricht- >> Von: jim Zhou [mailto:jim.jz.z...@gmail.com] >> Gesendet: Freitag, 13. November 2015 17:12 >> An: mysql@lists.mysql.com >> Betreff: --initialize specified but the data directory has files in it. >> Aborting. >> >> Hi, >> >> I did "yum install myswl-community-server" and "service mysqld start" >> I got the error >> >> Initializing MySQL database: 2015-11-13T15:54:01.203931Z 0 [Warning] >> Changed limits: max_open_files: 1024 (requested 5000) >> 2015-11-13T15:54:01.204205Z 0 [Warning] Changed limits: table_open_cache: >> 431 (requested 2000) >> 2015-11-13T15:54:01.204397Z 0 [Warning] TIMESTAMP with implicit DEFAULT >> value is deprecated. Please use --explicit_defaults_for_timestamp server >> option (see documentation for more details). >> 2015-11-13T15:54:01.207712Z 0 [ERROR] --initialize specified but the data >> directory has files in it. Aborting. >> 2015-11-13T15:54:01.207751Z 0 [ERROR] Aborting >> >> can someone help? >> > >
Re: --initialize specified but the data directory has files in it. Aborting.
Am 13.11.2015 um 17:46 schrieb Axel Diehl: what kind of OS do you have? pretty sure Fedora/CentOS7 because "yum" and the package name, if i would be him i would just install mariadb which is the default mysql implementation these days on most linux distributions and hence the packages are better maintained -Ursprüngliche Nachricht- Von: jim Zhou [mailto:jim.jz.z...@gmail.com] Gesendet: Freitag, 13. November 2015 17:12 An: mysql@lists.mysql.com Betreff: --initialize specified but the data directory has files in it. Aborting. Hi, I did "yum install myswl-community-server" and "service mysqld start" I got the error Initializing MySQL database: 2015-11-13T15:54:01.203931Z 0 [Warning] Changed limits: max_open_files: 1024 (requested 5000) 2015-11-13T15:54:01.204205Z 0 [Warning] Changed limits: table_open_cache: 431 (requested 2000) 2015-11-13T15:54:01.204397Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details). 2015-11-13T15:54:01.207712Z 0 [ERROR] --initialize specified but the data directory has files in it. Aborting. 2015-11-13T15:54:01.207751Z 0 [ERROR] Aborting can someone help? signature.asc Description: OpenPGP digital signature
AW: --initialize specified but the data directory has files in it. Aborting.
Hi, what kind of OS do you have? Regards, Axel -Ursprüngliche Nachricht- Von: jim Zhou [mailto:jim.jz.z...@gmail.com] Gesendet: Freitag, 13. November 2015 17:12 An: mysql@lists.mysql.com Betreff: --initialize specified but the data directory has files in it. Aborting. Hi, I did "yum install myswl-community-server" and "service mysqld start" I got the error Initializing MySQL database: 2015-11-13T15:54:01.203931Z 0 [Warning] Changed limits: max_open_files: 1024 (requested 5000) 2015-11-13T15:54:01.204205Z 0 [Warning] Changed limits: table_open_cache: 431 (requested 2000) 2015-11-13T15:54:01.204397Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details). 2015-11-13T15:54:01.207712Z 0 [ERROR] --initialize specified but the data directory has files in it. Aborting. 2015-11-13T15:54:01.207751Z 0 [ERROR] Aborting can someone help? thank you, Jim -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql
Re: --initialize specified but the data directory has files in it. Aborting.
Am 13.11.2015 um 17:37 schrieb jim Zhou: I change socket=/tmp/mysql.sock in my.cnf file and I am still having the same error. ls -lha /var/lib/mysql the directory is not empty. those .pem files are created by the service even I deleted them. write a bugreport if they are really created by the service before mysql_install_db is called, in the meantime make sure the directory is empty and call "mysql_install_db" by hand without trying to start the service before P.S.: don't reply offlist! [root@deweyods1 pem]# ls -lha /var/lib/mysql total 48K drwxr-x--x. 2 mysql mysql 4.0K Nov 13 07:33 . drwxr-xr-x. 44 root root 4.0K Nov 12 15:12 .. -rw---. 1 mysql mysql 255 Nov 13 08:27 .bash_history -rw---. 1 mysql mysql 1.7K Nov 13 07:33 ca-key.pem -rw-r--r--. 1 mysql mysql 1.1K Nov 13 07:33 ca.pem -rw-r--r--. 1 mysql mysql 1.1K Nov 13 07:33 client-cert.pem -rw---. 1 mysql mysql 1.7K Nov 13 07:33 client-key.pem -rw---. 1 mysql mysql 1.7K Nov 13 07:33 private_key.pem -rw-r--r--. 1 mysql mysql 451 Nov 13 07:33 public_key.pem -rw-r--r--. 1 mysql mysql 1.1K Nov 13 07:33 server-cert.pem -rw---. 1 mysql mysql 1.7K Nov 13 07:33 server-key.pem -rw---. 1 mysql mysql 578 Nov 12 15:21 .viminfo signature.asc Description: OpenPGP digital signature
Re: --initialize specified but the data directory has files in it. Aborting.
Am 13.11.2015 um 17:12 schrieb jim Zhou: I did "yum install myswl-community-server" and "service mysqld start" I got the error Initializing MySQL database: 2015-11-13T15:54:01.203931Z 0 [Warning] Changed limits: max_open_files: 1024 (requested 5000) 2015-11-13T15:54:01.204205Z 0 [Warning] Changed limits: table_open_cache: 431 (requested 2000) 2015-11-13T15:54:01.204397Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details). 2015-11-13T15:54:01.207712Z 0 [ERROR] --initialize specified but the data directory has files in it. Aborting. 2015-11-13T15:54:01.207751Z 0 [ERROR] Aborting this is most likely because the socket file lives by default in "/var/lib/mysql" and maybe created too soon for the task write a bugreport and in the meantime temporary configure mysqld with the socket file somewhere else like /tmp, make sure with "ls -lha /var/lib/mysql" that the directory is really empty signature.asc Description: OpenPGP digital signature
--initialize specified but the data directory has files in it. Aborting.
Hi, I did "yum install myswl-community-server" and "service mysqld start" I got the error Initializing MySQL database: 2015-11-13T15:54:01.203931Z 0 [Warning] Changed limits: max_open_files: 1024 (requested 5000) 2015-11-13T15:54:01.204205Z 0 [Warning] Changed limits: table_open_cache: 431 (requested 2000) 2015-11-13T15:54:01.204397Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details). 2015-11-13T15:54:01.207712Z 0 [ERROR] --initialize specified but the data directory has files in it. Aborting. 2015-11-13T15:54:01.207751Z 0 [ERROR] Aborting can someone help? thank you, Jim
Re: *.index files in MySQL Data directory
sound like files of a replication slave or master and that is why you should post details and folder-listings in the first posting to hep understand waht you are speaking about [root@srv-rhsoft:~]$ ls /data/db/mysql-srv/ | grep bin -rw-rw 1 mysql mysql 12M 2013-03-22 19:44 bin.01 -rw-rw 1 mysql mysql 14M 2013-03-23 13:36 bin.02 -rw-rw 1 mysql mysql 153M 2013-03-27 20:33 bin.03 -rw-rw 1 mysql mysql 102 2013-03-23 13:38 bin.index [root@srv-rhsoft:~]$ cat /data/db/mysql-srv/bin.index /mnt/data/db/mysql-srv/bin.01 /mnt/data/db/mysql-srv/bin.02 /mnt/data/db/mysql-srv/bin.03 [root@srv-rhsoft:~]$ cat /etc/my.cnf | grep bin log-bin = /mnt/data/db/mysql-srv/bin.log log-bin-index = /mnt/data/db/mysql-srv/bin.index Am 27.03.2013 20:25, schrieb Arnold: > There are files beginning with 1.. The sequence number is > 01 to 15. A new file is created every time MySQL is restarted. The > 1.index file contains a list of these files. One thing that I have done is > when I was hardening the security we stopped MySQL and moved the data > directory to a directory called /var/lib/db/mysql. I changed the datadir > variable in the my.cnf file to point to this directory. This was to be sure > that our data directory was not on the same partition as our SYSTEM or the > Log partitions. Everything is working fine except I have the files mentioned > above. > > -Original Message- > From: Reindl Harald [mailto:h.rei...@thelounge.net] > Sent: Wednesday, March 27, 2013 3:14 PM > To: mysql@lists.mysql.com > Subject: Re: *.index files in MySQL Data directory > > > > Am 27.03.2013 19:53, schrieb Arnold: >> What are the *.index files in the MySQL Data directory? I notice a new one >> is created every time that MySQL is stopped and restarted. My Data >> directory is not in the default location so does that have anything to do >> with it? > > maybe a "ls -lha" of a sample would be nice > > never seen one of them from MySQL 3.x to 5.5 nor with MariaDB, indexes are > .MYI signature.asc Description: OpenPGP digital signature
RE: *.index files in MySQL Data directory
There are files beginning with 1.. The sequence number is 01 to 15. A new file is created every time MySQL is restarted. The 1.index file contains a list of these files. One thing that I have done is when I was hardening the security we stopped MySQL and moved the data directory to a directory called /var/lib/db/mysql. I changed the datadir variable in the my.cnf file to point to this directory. This was to be sure that our data directory was not on the same partition as our SYSTEM or the Log partitions. Everything is working fine except I have the files mentioned above. Thanks, Sandra Arnold Data Warehouse Administrator MartinFederal Consulting Consultant to Oak Ridge National Laboratories Computational Data Analytics Group Data Architectures Team -Original Message- From: Reindl Harald [mailto:h.rei...@thelounge.net] Sent: Wednesday, March 27, 2013 3:14 PM To: mysql@lists.mysql.com Subject: Re: *.index files in MySQL Data directory Am 27.03.2013 19:53, schrieb Arnold: > What are the *.index files in the MySQL Data directory? I notice a new one > is created every time that MySQL is stopped and restarted. My Data directory > is not in the default location so does that have anything to do with it? maybe a "ls -lha" of a sample would be nice never seen one of them from MySQL 3.x to 5.5 nor with MariaDB, indexes are .MYI -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql
Re: *.index files in MySQL Data directory
Am 27.03.2013 19:53, schrieb Arnold: > What are the *.index files in the MySQL Data directory? I notice a new one > is created every time that MySQL is stopped and restarted. My Data directory > is not in the default location so does that have anything to do with it? maybe a "ls -lha" of a sample would be nice never seen one of them from MySQL 3.x to 5.5 nor with MariaDB, indexes are .MYI signature.asc Description: OpenPGP digital signature
*.index files in MySQL Data directory
What are the *.index files in the MySQL Data directory? I notice a new one is created every time that MySQL is stopped and restarted. My Data directory is not in the default location so does that have anything to do with it? Thanks, Sandra Arnold Data Warehouse Administrator MartinFederal Consulting Consultant to Oak Ridge National Laboratories Computational Data Analytics Group Data Architectures Team Building 5100, M/S 6173 OAK RIDGE TN 37831-6173 (865)241-1530
Re: Fail to change MySQL data directory on ubuntu
That is likely the case. As you said, I do not use innodb tables. Best, Jia On Fri, Aug 28, 2009 at 8:25 AM, Johnny Withers wrote: > Maybe you do not use innodb tables, in that case there would be no data loss. > > On Thursday, August 27, 2009, Jia Chen wrote: >> Thanks for the tips. Where can I find more details about the ibdata file? >> >> After I changed the data dir, hese file did get recreated. So far, I have >> not noticed any data loss yet. >> >> Best, >> Jia >> >> Eric Bergen wrote: >> >> That procedure is horribly incorrect. You should simply move the >> ib_log and ibdata files with the rest of the datadir. The ibdata1 file >> contains innodb's system tables and depending on your setting of >> innodb_file_per_table it also contains your data! >> >> On Thu, Aug 27, 2009 at 7:56 AM, Jia Chen wrote: >> >> >> Chen, Did you really delete ibdata1 ? >> >> >> Yes, I did. >> >> Best, >> Jia >> >> >> Claudio Nanni wrote: >> >> >> 2009/8/26 chen jia mailto:chen.1...@gmail.com>> >> >> Hi there, >> >> I am using MySQL on ubuntu 8.04. >> >> I followed this link >> >> http://www.ubuntu-howto.info/howto/how-to-move-mysql-databases-to-another-location-partition-or-hard-drive >> to change the data directory of MySQL. >> >> After stopping MySQL: sudo /etc/init.d/mysql stop >> >> I make a new directory: sudo mkdir /media/disk/MySQL_data >> >> then change the ownership of new directory, sudo chown mysql:mysql >> /media/disk/MySQL_data >> >> and copy all data to the new directory, cp -r -p /var/lib/mysql/* >> /media/disk/MySQL_data/ and deleted all files like ibdata1, >> >> >> Chen, Did you really delete ibdata1 ? >> >> >> >> >> >> >> ib_logfile0, and ib_logfile1. >> >> I then edit /etc/mysql/my.conf and update the "datadir" to my new >> directory. I also update /etc/apparmor.d/usr.sbin.mysql so that news >> lines with /var/lib/mysql replaced by /media/disk/MySQL_data are >> added. >> >> However, after sudo /etc/init.d/apparmor reload >> >> I try sudo /etc/init.d/mysql start >> >> I got >> * Starting MySQL database server mysqld >> [fail] >> >> If I change the "datadir" line in /etc/mysql/my.conf back to the >> original one, I can start MySQL successfully. >> >> I think I have done everything needed to change MySQL data directory. >> >> Why am I still getting this error? Where can I start to look for >> the causes? >> >> Thanks. >> >> Jia >> >> -- >> MySQL General Mailing List >> For list archives: http://lists.mysql.com/mysql >> To unsubscribe: >> http://lists.mysql.com/mysql?unsub=claudio.na...@gmail.com >> >> >> >> >> -- >> MySQL General Mailing List >> For list archives: http://lists.mysql.com/mysql >> To unsubscribe: http://lists.mysql.com/mysql?unsub=eric.ber...@gmail.com >> >> >> >> >> >> >> >> >> >> >> >> -- >> MySQL General Mailing List >> For list archives: http://lists.mysql.com/mysql >> To unsubscribe: http://lists.mysql.com/mysql?unsub=joh...@pixelated.net >> >> > > -- > - > Johnny Withers > 601.209.4985 > joh...@pixelated.net > -- Ohio State University - Finance 248 Fisher Hall 2100 Neil Ave. Columbus, Ohio 43210 Telephone: 614-292-2979 http://www.fisher.osu.edu/~chen_1002/ -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org
Re: Fail to change MySQL data directory on ubuntu
Maybe you do not use innodb tables, in that case there would be no data loss. On Thursday, August 27, 2009, Jia Chen wrote: > Thanks for the tips. Where can I find more details about the ibdata file? > > After I changed the data dir, hese file did get recreated. So far, I have not > noticed any data loss yet. > > Best, > Jia > > Eric Bergen wrote: > > That procedure is horribly incorrect. You should simply move the > ib_log and ibdata files with the rest of the datadir. The ibdata1 file > contains innodb's system tables and depending on your setting of > innodb_file_per_table it also contains your data! > > On Thu, Aug 27, 2009 at 7:56 AM, Jia Chen wrote: > > > Chen, Did you really delete ibdata1 ? > > > Yes, I did. > > Best, > Jia > > > Claudio Nanni wrote: > > > 2009/8/26 chen jia mailto:chen.1...@gmail.com>> > > Hi there, > > I am using MySQL on ubuntu 8.04. > > I followed this link > > http://www.ubuntu-howto.info/howto/how-to-move-mysql-databases-to-another-location-partition-or-hard-drive > to change the data directory of MySQL. > > After stopping MySQL: sudo /etc/init.d/mysql stop > > I make a new directory: sudo mkdir /media/disk/MySQL_data > > then change the ownership of new directory, sudo chown mysql:mysql > /media/disk/MySQL_data > > and copy all data to the new directory, cp -r -p /var/lib/mysql/* > /media/disk/MySQL_data/ and deleted all files like ibdata1, > > > Chen, Did you really delete ibdata1 ? > > > > > > > ib_logfile0, and ib_logfile1. > > I then edit /etc/mysql/my.conf and update the "datadir" to my new > directory. I also update /etc/apparmor.d/usr.sbin.mysql so that news > lines with /var/lib/mysql replaced by /media/disk/MySQL_data are > added. > > However, after sudo /etc/init.d/apparmor reload > > I try sudo /etc/init.d/mysql start > > I got > * Starting MySQL database server mysqld > [fail] > > If I change the "datadir" line in /etc/mysql/my.conf back to the > original one, I can start MySQL successfully. > > I think I have done everything needed to change MySQL data directory. > > Why am I still getting this error? Where can I start to look for > the causes? > > Thanks. > > Jia > > -- > MySQL General Mailing List > For list archives: http://lists.mysql.com/mysql > To unsubscribe: > http://lists.mysql.com/mysql?unsub=claudio.na...@gmail.com > > > > > -- > MySQL General Mailing List > For list archives: http://lists.mysql.com/mysql > To unsubscribe: http://lists.mysql.com/mysql?unsub=eric.ber...@gmail.com > > > > > > > > > > > > -- > MySQL General Mailing List > For list archives: http://lists.mysql.com/mysql > To unsubscribe: http://lists.mysql.com/mysql?unsub=joh...@pixelated.net > > -- - Johnny Withers 601.209.4985 joh...@pixelated.net -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org
Re: Fail to change MySQL data directory on ubuntu
Thanks for the tips. Where can I find more details about the ibdata file? After I changed the data dir, hese file did get recreated. So far, I have not noticed any data loss yet. Best, Jia Eric Bergen wrote: That procedure is horribly incorrect. You should simply move the ib_log and ibdata files with the rest of the datadir. The ibdata1 file contains innodb's system tables and depending on your setting of innodb_file_per_table it also contains your data! On Thu, Aug 27, 2009 at 7:56 AM, Jia Chen wrote: Chen, Did you really delete ibdata1 ? Yes, I did. Best, Jia Claudio Nanni wrote: 2009/8/26 chen jia mailto:chen.1...@gmail.com>> Hi there, I am using MySQL on ubuntu 8.04. I followed this link http://www.ubuntu-howto.info/howto/how-to-move-mysql-databases-to-another-location-partition-or-hard-drive to change the data directory of MySQL. After stopping MySQL: sudo /etc/init.d/mysql stop I make a new directory: sudo mkdir /media/disk/MySQL_data then change the ownership of new directory, sudo chown mysql:mysql /media/disk/MySQL_data and copy all data to the new directory, cp -r -p /var/lib/mysql/* /media/disk/MySQL_data/ and deleted all files like ibdata1, Chen, Did you really delete ibdata1 ? ib_logfile0, and ib_logfile1. I then edit /etc/mysql/my.conf and update the "datadir" to my new directory. I also update /etc/apparmor.d/usr.sbin.mysql so that news lines with /var/lib/mysql replaced by /media/disk/MySQL_data are added. However, after sudo /etc/init.d/apparmor reload I try sudo /etc/init.d/mysql start I got * Starting MySQL database server mysqld [fail] If I change the "datadir" line in /etc/mysql/my.conf back to the original one, I can start MySQL successfully. I think I have done everything needed to change MySQL data directory. Why am I still getting this error? Where can I start to look for the causes? Thanks. Jia -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/mysql?unsub=claudio.na...@gmail.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=eric.ber...@gmail.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org
Re: Fail to change MySQL data directory on ubuntu
That procedure is horribly incorrect. You should simply move the ib_log and ibdata files with the rest of the datadir. The ibdata1 file contains innodb's system tables and depending on your setting of innodb_file_per_table it also contains your data! On Thu, Aug 27, 2009 at 7:56 AM, Jia Chen wrote: >> Chen, Did you really delete ibdata1 ? > > Yes, I did. > > Best, > Jia > > > Claudio Nanni wrote: >> >> >> 2009/8/26 chen jia mailto:chen.1...@gmail.com>> >> >> Hi there, >> >> I am using MySQL on ubuntu 8.04. >> >> I followed this link >> >> http://www.ubuntu-howto.info/howto/how-to-move-mysql-databases-to-another-location-partition-or-hard-drive >> to change the data directory of MySQL. >> >> After stopping MySQL: sudo /etc/init.d/mysql stop >> >> I make a new directory: sudo mkdir /media/disk/MySQL_data >> >> then change the ownership of new directory, sudo chown mysql:mysql >> /media/disk/MySQL_data >> >> and copy all data to the new directory, cp -r -p /var/lib/mysql/* >> /media/disk/MySQL_data/ and deleted all files like ibdata1, >> >> >> Chen, Did you really delete ibdata1 ? >> >> >> >> >> >> >> ib_logfile0, and ib_logfile1. >> >> I then edit /etc/mysql/my.conf and update the "datadir" to my new >> directory. I also update /etc/apparmor.d/usr.sbin.mysql so that news >> lines with /var/lib/mysql replaced by /media/disk/MySQL_data are >> added. >> >> However, after sudo /etc/init.d/apparmor reload >> >> I try sudo /etc/init.d/mysql start >> >> I got >> * Starting MySQL database server mysqld >> [fail] >> >> If I change the "datadir" line in /etc/mysql/my.conf back to the >> original one, I can start MySQL successfully. >> >> I think I have done everything needed to change MySQL data directory. >> >> Why am I still getting this error? Where can I start to look for >> the causes? >> >> Thanks. >> >> Jia >> >> -- >> MySQL General Mailing List >> For list archives: http://lists.mysql.com/mysql >> To unsubscribe: >> http://lists.mysql.com/mysql?unsub=claudio.na...@gmail.com >> >> > > > -- > MySQL General Mailing List > For list archives: http://lists.mysql.com/mysql > To unsubscribe: http://lists.mysql.com/mysql?unsub=eric.ber...@gmail.com > > -- Eric Bergen eric.ber...@gmail.com http://www.ebergen.net -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org
Re: Fail to change MySQL data directory on ubuntu
> Chen, Did you really delete ibdata1 ? Yes, I did. Best, Jia Claudio Nanni wrote: 2009/8/26 chen jia mailto:chen.1...@gmail.com>> Hi there, I am using MySQL on ubuntu 8.04. I followed this link http://www.ubuntu-howto.info/howto/how-to-move-mysql-databases-to-another-location-partition-or-hard-drive to change the data directory of MySQL. After stopping MySQL: sudo /etc/init.d/mysql stop I make a new directory: sudo mkdir /media/disk/MySQL_data then change the ownership of new directory, sudo chown mysql:mysql /media/disk/MySQL_data and copy all data to the new directory, cp -r -p /var/lib/mysql/* /media/disk/MySQL_data/ and deleted all files like ibdata1, Chen, Did you really delete ibdata1 ? ib_logfile0, and ib_logfile1. I then edit /etc/mysql/my.conf and update the "datadir" to my new directory. I also update /etc/apparmor.d/usr.sbin.mysql so that news lines with /var/lib/mysql replaced by /media/disk/MySQL_data are added. However, after sudo /etc/init.d/apparmor reload I try sudo /etc/init.d/mysql start I got * Starting MySQL database server mysqld [fail] If I change the "datadir" line in /etc/mysql/my.conf back to the original one, I can start MySQL successfully. I think I have done everything needed to change MySQL data directory. Why am I still getting this error? Where can I start to look for the causes? Thanks. Jia -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/mysql?unsub=claudio.na...@gmail.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org
Re: Fail to change MySQL data directory on ubuntu
2009/8/26 chen jia > Hi there, > > I am using MySQL on ubuntu 8.04. > > I followed this link > > http://www.ubuntu-howto.info/howto/how-to-move-mysql-databases-to-another-location-partition-or-hard-drive > to change the data directory of MySQL. > > After stopping MySQL: sudo /etc/init.d/mysql stop > > I make a new directory: sudo mkdir /media/disk/MySQL_data > > then change the ownership of new directory, sudo chown mysql:mysql > /media/disk/MySQL_data > > and copy all data to the new directory, cp -r -p /var/lib/mysql/* > /media/disk/MySQL_data/ and deleted all files like ibdata1, Chen, Did you really delete ibdata1 ? > ib_logfile0, and ib_logfile1. > > I then edit /etc/mysql/my.conf and update the "datadir" to my new > directory. I also update /etc/apparmor.d/usr.sbin.mysql so that news > lines with /var/lib/mysql replaced by /media/disk/MySQL_data are > added. > > However, after sudo /etc/init.d/apparmor reload > > I try sudo /etc/init.d/mysql start > > I got > * Starting MySQL database server mysqld >[fail] > > If I change the "datadir" line in /etc/mysql/my.conf back to the > original one, I can start MySQL successfully. > > I think I have done everything needed to change MySQL data directory. > > Why am I still getting this error? Where can I start to look for the > causes? > > Thanks. > > Jia > > -- > MySQL General Mailing List > For list archives: http://lists.mysql.com/mysql > To unsubscribe: > http://lists.mysql.com/mysql?unsub=claudio.na...@gmail.com > >
Re: Fail to change MySQL data directory on ubuntu
Hi Johnny, Thanks you so much! Your command fixed the problem beautifully. Now, MySQL can start successfully. I can create and drop databases without problem. Thanks again. Best, Jia Johnny Withers wrote: I'm at work now, this is the cmd I used: chcon -R -u system_u -r object_r -t mysql_db_t /data (my data lives in /data/mysqlXX -- were XX is the server version) On Wed, Aug 26, 2009 at 8:02 AM, Johnny Withers <mailto:joh...@pixelated.net>> wrote: Yes, error 13, permission denied. Check selinux setup. I had this same problem last week on a CentOS machine. I had to change the object type of the new data dir to mysqld-something. I'm on a mobile phone and can't remember the exact cmd. On Tuesday, August 25, 2009, Jia Chen mailto:chen.1...@gmail.com>> wrote: > I run sudo /etc/init.d/mysql start and check the syslog by running sudo tail -f /var/log/syslog > > This is what I get > Aug 25 22:18:06 chenj-desktop mysqld_safe[10934]: started > Aug 25 22:18:06 chenj-desktop kernel: [11083.933531] type=1503 audit(1251253086.020:43): operation="inode_create" requested_mask="a::" denied_mask="a::" fsuid=0 name="/home/chenj/MySQL_data/chenj-desktop.lower-test" pid=10936 profile="/usr/sbin/mysqld" > Aug 25 22:18:06 chenj-desktop kernel: [11083.933581] type=1503 audit(1251253086.020:44): operation="inode_create" requested_mask="a::" denied_mask="a::" fsuid=0 name="/home/chenj/MySQL_data/chenj-desktop.lower-test" pid=10936 profile="/usr/sbin/mysqld" > Aug 25 22:18:06 chenj-desktop mysqld[10937]: 090825 22:18:06 [Warning] option 'thread_stack': unsigned value 128 adjusted to 131072 > Aug 25 22:18:06 chenj-desktop mysqld[10937]: 090825 22:18:06 [Warning] Can't create test file /home/chenj/MySQL_data/chenj-desktop.lower-test > Aug 25 22:18:06 chenj-desktop mysqld[10937]: 090825 22:18:06 [Warning] Can't create test file /home/chenj/MySQL_data/chenj-desktop.lower-test > Aug 25 22:18:06 chenj-desktop mysqld[10937]: 090825 22:18:06 InnoDB: Operating system error number 13 in a file operation. > Aug 25 22:18:06 chenj-desktop mysqld[10937]: InnoDB: The error means mysqld does not have the access rights to > Aug 25 22:18:06 chenj-desktop mysqld[10937]: InnoDB: the directory. > Aug 25 22:18:06 chenj-desktop mysqld[10937]: InnoDB: File name ./ibdata1 > Aug 25 22:18:06 chenj-desktop mysqld[10937]: InnoDB: File operation call: 'create'. > Aug 25 22:18:06 chenj-desktop mysqld[10937]: InnoDB: Cannot continue operation. > Aug 25 22:18:06 chenj-desktop kernel: [11083.962674] type=1503 audit(1251253086.048:45): operation="inode_create" requested_mask="a::" denied_mask="a::" fsuid=110 name="/home/chenj/MySQL_data/ibdata1" pid=10936 profile="/usr/sbin/mysqld" > Aug 25 22:18:06 chenj-desktop mysqld_safe[10944]: ended > Aug 25 22:18:20 chenj-desktop /etc/init.d/mysql[11094]: 0 processes alive and '/usr/bin/mysqladmin --defaults-file=/etc/mysql/debian.cnf ping' resulted in > Aug 25 22:18:20 chenj-desktop /etc/init.d/mysql[11094]: ^G/usr/bin/mysqladmin: connect to server at 'localhost' failed > Aug 25 22:18:20 chenj-desktop /etc/init.d/mysql[11094]: error: 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)' > Aug 25 22:18:20 chenj-desktop /etc/init.d/mysql[11094]: Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists! > Aug 25 22:18:20 chenj-desktop /etc/init.d/mysql[11094]: > > Does this message tell me any thing about the problem? Thanks. > > Best, > Jia > > Johnny Withers wrote: > > First, check the error log, if you can't find it, start mysql from the > cmd line by running safe_mysqld it should print errors to console. > > If it is a permission issue, it might be caused be selinux, you'll > need to change the object type od that new directory to mysqld- > something. I can't recall the command. A google search on selinux and > mysql should produce good results. > > On Tuesday, August 25, 2009, chen jia mailto:chen.1...@gmail.com>> wrote: > > > Hi there, > > I am using MySQL on ubuntu 8.04. > > I followed this link > http://www.ubuntu-howto.info/howto/how-to-move-mysql-databases-to-another-location-partition-or-hard-drive > to change the data directory of MySQL. > > After stopping MyS
Re: Fail to change MySQL data directory on ubuntu
I'm at work now, this is the cmd I used: chcon -R -u system_u -r object_r -t mysql_db_t /data (my data lives in /data/mysqlXX -- were XX is the server version) On Wed, Aug 26, 2009 at 8:02 AM, Johnny Withers wrote: > Yes, error 13, permission denied. Check selinux setup. I had this same > problem last week on a CentOS machine. I had to change the object type > of the new data dir to mysqld-something. I'm on a mobile phone and > can't remember the exact cmd. > > > On Tuesday, August 25, 2009, Jia Chen wrote: > > I run sudo /etc/init.d/mysql start and check the syslog by running sudo > tail -f /var/log/syslog > > > > This is what I get > > Aug 25 22:18:06 chenj-desktop mysqld_safe[10934]: started > > Aug 25 22:18:06 chenj-desktop kernel: [11083.933531] type=1503 > audit(1251253086.020:43): operation="inode_create" requested_mask="a::" > denied_mask="a::" fsuid=0 > name="/home/chenj/MySQL_data/chenj-desktop.lower-test" pid=10936 > profile="/usr/sbin/mysqld" > > Aug 25 22:18:06 chenj-desktop kernel: [11083.933581] type=1503 > audit(1251253086.020:44): operation="inode_create" requested_mask="a::" > denied_mask="a::" fsuid=0 > name="/home/chenj/MySQL_data/chenj-desktop.lower-test" pid=10936 > profile="/usr/sbin/mysqld" > > Aug 25 22:18:06 chenj-desktop mysqld[10937]: 090825 22:18:06 [Warning] > option 'thread_stack': unsigned value 128 adjusted to 131072 > > Aug 25 22:18:06 chenj-desktop mysqld[10937]: 090825 22:18:06 [Warning] > Can't create test file /home/chenj/MySQL_data/chenj-desktop.lower-test > > Aug 25 22:18:06 chenj-desktop mysqld[10937]: 090825 22:18:06 [Warning] > Can't create test file /home/chenj/MySQL_data/chenj-desktop.lower-test > > Aug 25 22:18:06 chenj-desktop mysqld[10937]: 090825 22:18:06 InnoDB: > Operating system error number 13 in a file operation. > > Aug 25 22:18:06 chenj-desktop mysqld[10937]: InnoDB: The error means > mysqld does not have the access rights to > > Aug 25 22:18:06 chenj-desktop mysqld[10937]: InnoDB: the directory. > > Aug 25 22:18:06 chenj-desktop mysqld[10937]: InnoDB: File name ./ibdata1 > > Aug 25 22:18:06 chenj-desktop mysqld[10937]: InnoDB: File operation call: > 'create'. > > Aug 25 22:18:06 chenj-desktop mysqld[10937]: InnoDB: Cannot continue > operation. > > Aug 25 22:18:06 chenj-desktop kernel: [11083.962674] type=1503 > audit(1251253086.048:45): operation="inode_create" requested_mask="a::" > denied_mask="a::" fsuid=110 name="/home/chenj/MySQL_data/ibdata1" pid=10936 > profile="/usr/sbin/mysqld" > > Aug 25 22:18:06 chenj-desktop mysqld_safe[10944]: ended > > Aug 25 22:18:20 chenj-desktop /etc/init.d/mysql[11094]: 0 processes alive > and '/usr/bin/mysqladmin --defaults-file=/etc/mysql/debian.cnf ping' > resulted in > > Aug 25 22:18:20 chenj-desktop /etc/init.d/mysql[11094]: > ^G/usr/bin/mysqladmin: connect to server at 'localhost' failed > > Aug 25 22:18:20 chenj-desktop /etc/init.d/mysql[11094]: error: 'Can't > connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' > (2)' > > Aug 25 22:18:20 chenj-desktop /etc/init.d/mysql[11094]: Check that mysqld > is running and that the socket: '/var/run/mysqld/mysqld.sock' exists! > > Aug 25 22:18:20 chenj-desktop /etc/init.d/mysql[11094]: > > > > Does this message tell me any thing about the problem? Thanks. > > > > Best, > > Jia > > > > Johnny Withers wrote: > > > > First, check the error log, if you can't find it, start mysql from the > > cmd line by running safe_mysqld it should print errors to console. > > > > If it is a permission issue, it might be caused be selinux, you'll > > need to change the object type od that new directory to mysqld- > > something. I can't recall the command. A google search on selinux and > > mysql should produce good results. > > > > On Tuesday, August 25, 2009, chen jia wrote: > > > > > > Hi there, > > > > I am using MySQL on ubuntu 8.04. > > > > I followed this link > > > http://www.ubuntu-howto.info/howto/how-to-move-mysql-databases-to-another-location-partition-or-hard-drive > > to change the data directory of MySQL. > > > > After stopping MySQL: sudo /etc/init.d/mysql stop > > > > I make a new directory: sudo mkdir /media/disk/MySQL_data > > > > then change the ownership of new directory, sudo chown mysql:mysql > > /media/disk/MySQL_data > > > > and copy al
Re: Fail to change MySQL data directory on ubuntu
Yes, error 13, permission denied. Check selinux setup. I had this same problem last week on a CentOS machine. I had to change the object type of the new data dir to mysqld-something. I'm on a mobile phone and can't remember the exact cmd. On Tuesday, August 25, 2009, Jia Chen wrote: > I run sudo /etc/init.d/mysql start and check the syslog by running sudo tail > -f /var/log/syslog > > This is what I get > Aug 25 22:18:06 chenj-desktop mysqld_safe[10934]: started > Aug 25 22:18:06 chenj-desktop kernel: [11083.933531] type=1503 > audit(1251253086.020:43): operation="inode_create" requested_mask="a::" > denied_mask="a::" fsuid=0 > name="/home/chenj/MySQL_data/chenj-desktop.lower-test" pid=10936 > profile="/usr/sbin/mysqld" > Aug 25 22:18:06 chenj-desktop kernel: [11083.933581] type=1503 > audit(1251253086.020:44): operation="inode_create" requested_mask="a::" > denied_mask="a::" fsuid=0 > name="/home/chenj/MySQL_data/chenj-desktop.lower-test" pid=10936 > profile="/usr/sbin/mysqld" > Aug 25 22:18:06 chenj-desktop mysqld[10937]: 090825 22:18:06 [Warning] option > 'thread_stack': unsigned value 128 adjusted to 131072 > Aug 25 22:18:06 chenj-desktop mysqld[10937]: 090825 22:18:06 [Warning] Can't > create test file /home/chenj/MySQL_data/chenj-desktop.lower-test > Aug 25 22:18:06 chenj-desktop mysqld[10937]: 090825 22:18:06 [Warning] Can't > create test file /home/chenj/MySQL_data/chenj-desktop.lower-test > Aug 25 22:18:06 chenj-desktop mysqld[10937]: 090825 22:18:06 InnoDB: > Operating system error number 13 in a file operation. > Aug 25 22:18:06 chenj-desktop mysqld[10937]: InnoDB: The error means mysqld > does not have the access rights to > Aug 25 22:18:06 chenj-desktop mysqld[10937]: InnoDB: the directory. > Aug 25 22:18:06 chenj-desktop mysqld[10937]: InnoDB: File name ./ibdata1 > Aug 25 22:18:06 chenj-desktop mysqld[10937]: InnoDB: File operation call: > 'create'. > Aug 25 22:18:06 chenj-desktop mysqld[10937]: InnoDB: Cannot continue > operation. > Aug 25 22:18:06 chenj-desktop kernel: [11083.962674] type=1503 > audit(1251253086.048:45): operation="inode_create" requested_mask="a::" > denied_mask="a::" fsuid=110 name="/home/chenj/MySQL_data/ibdata1" pid=10936 > profile="/usr/sbin/mysqld" > Aug 25 22:18:06 chenj-desktop mysqld_safe[10944]: ended > Aug 25 22:18:20 chenj-desktop /etc/init.d/mysql[11094]: 0 processes alive and > '/usr/bin/mysqladmin --defaults-file=/etc/mysql/debian.cnf ping' resulted in > Aug 25 22:18:20 chenj-desktop /etc/init.d/mysql[11094]: > ^G/usr/bin/mysqladmin: connect to server at 'localhost' failed > Aug 25 22:18:20 chenj-desktop /etc/init.d/mysql[11094]: error: 'Can't connect > to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)' > Aug 25 22:18:20 chenj-desktop /etc/init.d/mysql[11094]: Check that mysqld is > running and that the socket: '/var/run/mysqld/mysqld.sock' exists! > Aug 25 22:18:20 chenj-desktop /etc/init.d/mysql[11094]: > > Does this message tell me any thing about the problem? Thanks. > > Best, > Jia > > Johnny Withers wrote: > > First, check the error log, if you can't find it, start mysql from the > cmd line by running safe_mysqld it should print errors to console. > > If it is a permission issue, it might be caused be selinux, you'll > need to change the object type od that new directory to mysqld- > something. I can't recall the command. A google search on selinux and > mysql should produce good results. > > On Tuesday, August 25, 2009, chen jia wrote: > > > Hi there, > > I am using MySQL on ubuntu 8.04. > > I followed this link > http://www.ubuntu-howto.info/howto/how-to-move-mysql-databases-to-another-location-partition-or-hard-drive > to change the data directory of MySQL. > > After stopping MySQL: sudo /etc/init.d/mysql stop > > I make a new directory: sudo mkdir /media/disk/MySQL_data > > then change the ownership of new directory, sudo chown mysql:mysql > /media/disk/MySQL_data > > and copy all data to the new directory, cp -r -p /var/lib/mysql/* > /media/disk/MySQL_data/ and deleted all files like ibdata1, > ib_logfile0, and ib_logfile1. > > I then edit /etc/mysql/my.conf and update the "datadir" to my new > directory. I also update /etc/apparmor.d/usr.sbin.mysql so that news > lines with /var/lib/mysql replaced by /media/disk/MySQL_data are > added. > > However, after sudo /etc/init.d/apparmor reload > > I try sudo /etc/
Re: Fail to change MySQL data directory on ubuntu
I run sudo /etc/init.d/mysql start and check the syslog by running sudo tail -f /var/log/syslog This is what I get Aug 25 22:18:06 chenj-desktop mysqld_safe[10934]: started Aug 25 22:18:06 chenj-desktop kernel: [11083.933531] type=1503 audit(1251253086.020:43): operation="inode_create" requested_mask="a::" denied_mask="a::" fsuid=0 name="/home/chenj/MySQL_data/chenj-desktop.lower-test" pid=10936 profile="/usr/sbin/mysqld" Aug 25 22:18:06 chenj-desktop kernel: [11083.933581] type=1503 audit(1251253086.020:44): operation="inode_create" requested_mask="a::" denied_mask="a::" fsuid=0 name="/home/chenj/MySQL_data/chenj-desktop.lower-test" pid=10936 profile="/usr/sbin/mysqld" Aug 25 22:18:06 chenj-desktop mysqld[10937]: 090825 22:18:06 [Warning] option 'thread_stack': unsigned value 128 adjusted to 131072 Aug 25 22:18:06 chenj-desktop mysqld[10937]: 090825 22:18:06 [Warning] Can't create test file /home/chenj/MySQL_data/chenj-desktop.lower-test Aug 25 22:18:06 chenj-desktop mysqld[10937]: 090825 22:18:06 [Warning] Can't create test file /home/chenj/MySQL_data/chenj-desktop.lower-test Aug 25 22:18:06 chenj-desktop mysqld[10937]: 090825 22:18:06 InnoDB: Operating system error number 13 in a file operation. Aug 25 22:18:06 chenj-desktop mysqld[10937]: InnoDB: The error means mysqld does not have the access rights to Aug 25 22:18:06 chenj-desktop mysqld[10937]: InnoDB: the directory. Aug 25 22:18:06 chenj-desktop mysqld[10937]: InnoDB: File name ./ibdata1 Aug 25 22:18:06 chenj-desktop mysqld[10937]: InnoDB: File operation call: 'create'. Aug 25 22:18:06 chenj-desktop mysqld[10937]: InnoDB: Cannot continue operation. Aug 25 22:18:06 chenj-desktop kernel: [11083.962674] type=1503 audit(1251253086.048:45): operation="inode_create" requested_mask="a::" denied_mask="a::" fsuid=110 name="/home/chenj/MySQL_data/ibdata1" pid=10936 profile="/usr/sbin/mysqld" Aug 25 22:18:06 chenj-desktop mysqld_safe[10944]: ended Aug 25 22:18:20 chenj-desktop /etc/init.d/mysql[11094]: 0 processes alive and '/usr/bin/mysqladmin --defaults-file=/etc/mysql/debian.cnf ping' resulted in Aug 25 22:18:20 chenj-desktop /etc/init.d/mysql[11094]: ^G/usr/bin/mysqladmin: connect to server at 'localhost' failed Aug 25 22:18:20 chenj-desktop /etc/init.d/mysql[11094]: error: 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)' Aug 25 22:18:20 chenj-desktop /etc/init.d/mysql[11094]: Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists! Aug 25 22:18:20 chenj-desktop /etc/init.d/mysql[11094]: Does this message tell me any thing about the problem? Thanks. Best, Jia Johnny Withers wrote: First, check the error log, if you can't find it, start mysql from the cmd line by running safe_mysqld it should print errors to console. If it is a permission issue, it might be caused be selinux, you'll need to change the object type od that new directory to mysqld- something. I can't recall the command. A google search on selinux and mysql should produce good results. On Tuesday, August 25, 2009, chen jia wrote: Hi there, I am using MySQL on ubuntu 8.04. I followed this link http://www.ubuntu-howto.info/howto/how-to-move-mysql-databases-to-another-location-partition-or-hard-drive to change the data directory of MySQL. After stopping MySQL: sudo /etc/init.d/mysql stop I make a new directory: sudo mkdir /media/disk/MySQL_data then change the ownership of new directory, sudo chown mysql:mysql /media/disk/MySQL_data and copy all data to the new directory, cp -r -p /var/lib/mysql/* /media/disk/MySQL_data/ and deleted all files like ibdata1, ib_logfile0, and ib_logfile1. I then edit /etc/mysql/my.conf and update the "datadir" to my new directory. I also update /etc/apparmor.d/usr.sbin.mysql so that news lines with /var/lib/mysql replaced by /media/disk/MySQL_data are added. However, after sudo /etc/init.d/apparmor reload I try sudo /etc/init.d/mysql start I got * Starting MySQL database server mysqld [fail] If I change the "datadir" line in /etc/mysql/my.conf back to the original one, I can start MySQL successfully. I think I have done everything needed to change MySQL data directory. Why am I still getting this error? Where can I start to look for the causes? Thanks. Jia -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=joh...@pixelated.net -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org
Re: Fail to change MySQL data directory on ubuntu
First, check the error log, if you can't find it, start mysql from the cmd line by running safe_mysqld it should print errors to console. If it is a permission issue, it might be caused be selinux, you'll need to change the object type od that new directory to mysqld- something. I can't recall the command. A google search on selinux and mysql should produce good results. On Tuesday, August 25, 2009, chen jia wrote: > Hi there, > > I am using MySQL on ubuntu 8.04. > > I followed this link > http://www.ubuntu-howto.info/howto/how-to-move-mysql-databases-to-another-location-partition-or-hard-drive > to change the data directory of MySQL. > > After stopping MySQL: sudo /etc/init.d/mysql stop > > I make a new directory: sudo mkdir /media/disk/MySQL_data > > then change the ownership of new directory, sudo chown mysql:mysql > /media/disk/MySQL_data > > and copy all data to the new directory, cp -r -p /var/lib/mysql/* > /media/disk/MySQL_data/ and deleted all files like ibdata1, > ib_logfile0, and ib_logfile1. > > I then edit /etc/mysql/my.conf and update the "datadir" to my new > directory. I also update /etc/apparmor.d/usr.sbin.mysql so that news > lines with /var/lib/mysql replaced by /media/disk/MySQL_data are > added. > > However, after sudo /etc/init.d/apparmor reload > > I try sudo /etc/init.d/mysql start > > I got > * Starting MySQL database server mysqld > [fail] > > If I change the "datadir" line in /etc/mysql/my.conf back to the > original one, I can start MySQL successfully. > > I think I have done everything needed to change MySQL data directory. > > Why am I still getting this error? Where can I start to look for the causes? > > Thanks. > > Jia > > -- > MySQL General Mailing List > For list archives: http://lists.mysql.com/mysql > To unsubscribe: http://lists.mysql.com/mysql?unsub=joh...@pixelated.net > > -- - Johnny Withers 601.209.4985 joh...@pixelated.net -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org
Fail to change MySQL data directory on ubuntu
Hi there, I am using MySQL on ubuntu 8.04. I followed this link http://www.ubuntu-howto.info/howto/how-to-move-mysql-databases-to-another-location-partition-or-hard-drive to change the data directory of MySQL. After stopping MySQL: sudo /etc/init.d/mysql stop I make a new directory: sudo mkdir /media/disk/MySQL_data then change the ownership of new directory, sudo chown mysql:mysql /media/disk/MySQL_data and copy all data to the new directory, cp -r -p /var/lib/mysql/* /media/disk/MySQL_data/ and deleted all files like ibdata1, ib_logfile0, and ib_logfile1. I then edit /etc/mysql/my.conf and update the "datadir" to my new directory. I also update /etc/apparmor.d/usr.sbin.mysql so that news lines with /var/lib/mysql replaced by /media/disk/MySQL_data are added. However, after sudo /etc/init.d/apparmor reload I try sudo /etc/init.d/mysql start I got * Starting MySQL database server mysqld [fail] If I change the "datadir" line in /etc/mysql/my.conf back to the original one, I can start MySQL successfully. I think I have done everything needed to change MySQL data directory. Why am I still getting this error? Where can I start to look for the causes? Thanks. Jia -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org
Re: how to move the data directory?
boll wrote: > I would like to know the correct way to move the mysql data directory to > a different disk partition, so that the data can be accessed by mysql > under linux or windows. I'm using Ubuntu 7.1 and Windows XP. I wrote these steps for 4.0, I think they should work for you <http://rajshekhar.net/blog/archives/90-Moving-the-MySQLs-datadir-directory..html> Make sure you do a clean shutdown of mysqld before doing the steps (i.e. no kill -9 business) > > I copied the data directory to a separate partition. > I then changed the datadir in my.cnf, but Mysql would not start, warning: > ERROR 2002 (HY000): Can't connect to local MySQL server through socket > '/var/run/mysqld/mysqld.sock' Check mysqld.err file to see your errors. -- raj shekhar facts: http://rajshekhar.net | opinions: http://rajshekhar.net/blog Yoda of Borg are we: Futile is resistance. Assimilate you, we will 'Borg? Sounds Swedish.' - Lily, Star Trek First Contact -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
how to move the data directory?
I would like to know the correct way to move the mysql data directory to a different disk partition, so that the data can be accessed by mysql under linux or windows. I'm using Ubuntu 7.1 and Windows XP. I copied the data directory to a separate partition. I then changed the datadir in my.cnf, but Mysql would not start, warning: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' I'd appreciate your suggestions. -B. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Data directory in 2 platforms
On a dual boot it should work okay. I've done a similar thing, by taking the data folder from a Linux installation, copying it to a local windows computer and using a local install (same version of course) to read it. It worked fine. I would think the scenario is much the same as what you're suggesting. Any issues with the file system in Linux would be the same in windows as well (filename length, etc..) so if it's working in windows, it should work fine in Linux too. However, before committing, try it out with backed up data of course! -Micah On 12/24/2007 01:15 PM, Ahmad AlTwaijiry wrote: Good morning everyone, If I want to run MySQL server in Windows and Linux OS (dual boot desktop), but I want to make the data directory (the one that has all the databases tables and information) in one shared VFAT filesystem so if I create a database while I'm running in Linux and then reboot to windows and start mysql server I can see the database with all the tables from windows my concerns are: 1. is it possible to share the data directory in more than one OS ? 2. Can MySQL run in Linux with data directory running in vFat filesystem ? (I know it will run fine in windows) Thank you for reading my email and have a nice day :). -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Data directory in 2 platforms
Good morning everyone, If I want to run MySQL server in Windows and Linux OS (dual boot desktop), but I want to make the data directory (the one that has all the databases tables and information) in one shared VFAT filesystem so if I create a database while I'm running in Linux and then reboot to windows and start mysql server I can see the database with all the tables from windows my concerns are: 1. is it possible to share the data directory in more than one OS ? 2. Can MySQL run in Linux with data directory running in vFat filesystem ? (I know it will run fine in windows) Thank you for reading my email and have a nice day :). -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Use Samba Share For Data Directory
On 1/26/07, Dominik Klein <[EMAIL PROTECTED]> wrote: Michael Stearne schrieb: > We have 5.0.27 installed on a CentOS machine that doesn't have a ton > of disk space. Is it possible to point the data directory to lie on a > samba connected share? The samba share does not support Unix file > permissions so it is not possible to set mysql as the owner of the > files. Is this possible at all? If you use proper mount-options, you can set the owner of the files. mount -t smbfs -o uid=mysql $SHARE $DESTINATION In general: This should not be a problem, but it will be slow as the network is propably slower than your local disc. Guess you knew that. Yep. I'll try this . Thanks a lot! Michael -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Use Samba Share For Data Directory
Michael Stearne schrieb: We have 5.0.27 installed on a CentOS machine that doesn't have a ton of disk space. Is it possible to point the data directory to lie on a samba connected share? The samba share does not support Unix file permissions so it is not possible to set mysql as the owner of the files. Is this possible at all? If you use proper mount-options, you can set the owner of the files. mount -t smbfs -o uid=mysql $SHARE $DESTINATION In general: This should not be a problem, but it will be slow as the network is propably slower than your local disc. Guess you knew that. Regards Dominik -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Use Samba Share For Data Directory
We have 5.0.27 installed on a CentOS machine that doesn't have a ton of disk space. Is it possible to point the data directory to lie on a samba connected share? The samba share does not support Unix file permissions so it is not possible to set mysql as the owner of the files. Is this possible at all? Thanks, Michael -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
protecting sensitive info in data directory
i am working on a data collection system for an epidemiological study. the study holds among other things sensitive personal information. the personal info is stored in ONE table (i am using innodb_file_per_table) which we encrypt and wipe after the server is shutdown. the question is, where else could this data sit on disk? since i am new to MySQL, i am trying to get clear on the log files, what they contain, which ones hold data. i gather if we want to be able to perform rollbacks, we would need to keep the log files around, and since they store SQL transactions, we would have to encrypt (and wipe) them as well after the data collection session is over and server is shut down. right now i see ib_logfile{0,1}files and an ibdata1 file in addition to our *.frm and *.ibd tables. need we encrypt the *.frm files as well? which of the ibXXX files need we encrypt? are there any other MySQL files ANYWHERE that i should be aware of? Does MySQL ever write anything to the Windows temp directories? (Windows only app) yes, i am aware of MySQL encryption on a per field basis. we were asked to encrypt the whole table. many thanks les schaffer -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: How to move the MySQL data directory?
On 5/2/06, Yves Goergen <[EMAIL PROTECTED]> wrote: But upgrading MySQL like installing it after MySQL's guide brings a problem: I'd need to move the data directory to the new programme directory every time. That is what I do. I find it easier than moving the data directory to a non-standard location. I wrapped it all in a shellscript to be run by root. Assuming mysql is installed in /usr/local like this: lrwxr-xr-x 1 root wheel 37 May 2 14:34 mysql -> mysql-standard-5.0.20a-osx10.4-powerpc drwxr-xr-x 19 root mysql 646 May 2 14:34 mysql-standard-5.0.20a-osx10.4-powerpc And I have a tar.gz 'mysql-standard-5.0.21-osx10.4-powerpc.tar.gz', and the script below is called 'update-mysql.sh', this: # update-mysql.sh mysql-standard-5.0.21-osx10.4-powerpc.tar.gz Updates mysql to version 5.0.21. All I have to do manually is remove the directory with the old version. I'm sure I could automate that also but I thought it was good enough like this. #!/bin/sh tarfile=$1 usrlocal='/usr/local' olddir='mysql' newdir=${tarfile%.tar.gz} password='secret' mysqladmin -u root --password=$password shutdown sleep 5 mv $tarfile $usrlocal cd $usrlocal tar xvzf $tarfile cd $newdir rm -r data chown -R root:mysql . cd ../$olddir mv data ../$newdir/ cd .. rm $olddir ln -s $newdir $olddir rm $tarfile mysqld_safe & -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: How to move the MySQL data directory?
On 03.05.2006 12:34 (+0100), Logan, David (SST - Adelaide) wrote: > You could also have changed the directory in the global /etc/my.cnf file > by setting > > datadir=/path/to/mysql/data > > This is pretty simple and works a lot easier than hacking the init > scripts. As I said, there are two MySQL servers and there is no such "global" config file which all scripts seem to assume. There is one for each server and they are located in the datadir to make it easy (following the default setup). -- Yves Goergen "LonelyPixel" <[EMAIL PROTECTED]> http://beta.unclassified.de – My web laboratory. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
RE: How to move the MySQL data directory?
Apologies, I didn't read your initial posting properly. Perhaps a glance at this http://dev.mysql.com/doc/refman/5.0/en/mysqld-multi.html would provide you the facilities that you require for using multiple servers. This work well and enables you to manage the multiple global configuration files required. Regards Hi Yves, You could also have changed the directory in the global /etc/my.cnf file by setting datadir=/path/to/mysql/data This is pretty simple and works a lot easier than hacking the init scripts. Regards --- ** _/ ** David Logan *** _/ *** ITO Delivery Specialist - Database *_/* Hewlett-Packard Australia Ltd _/_/_/ _/_/_/ E-Mail: [EMAIL PROTECTED] _/ _/ _/ _/ Desk: +618 8408 4273 _/ _/ _/_/_/ Mobile: 0417 268 665 *_/ ** ** _/ Postal: 148 Frome Street, _/ ** Adelaide SA 5001 Australia invent --- -Original Message- From: Yves Goergen [mailto:[EMAIL PROTECTED] Sent: Wednesday, 3 May 2006 8:01 PM To: paul rivers Cc: mysql@lists.mysql.com Subject: Re: How to move the MySQL data directory? On 03.05.2006 01:21 (+0100), paul rivers wrote: > Specify the data dir in the local my.cnf and be sure your instance uses it > by starting it with the --defaults-file parameter set to that instance's > local copy. Okay, since hacking seems to be required anyway, I hacked it the straight-forward and least-change way. I already had datadir=... changed in the init script to the correct location. Now I also insert some variables corrections in bin/mysqld_safe: # here are the lines where ledir is set totally wrong... MY_BASEDIR_VERSION=`pwd` ledir=${MY_BASEDIR_VERSION}/bin DATADIR=`pwd | sed -r "s;/usr/local/;/var/;"`/data defaults="--defaults-file=${DATADIR}/my.cnf" # user=... and so on This does the job pretty well for MySQL 4.0. Need to do it with every upgrade, but I think I can automate it. MySQL 5.0 required a less invasive hack though. I saw that setting datadir= in the proposed init script is for nothing at the very beginning since it's overwritten again right below. So moving that line further down helped. Then the mysqld_safe call in the 'start' section required an additional parameter --defaults-file=$datadir/my.cnf to make it read my socket name, IP & port etc. Now both servers are up and running fine again, side by side, with the *entire* data directory moved somewhere else, saving me from handling that with every upgrade. Thanks for your help, I thought it could be done an easy way but it seems nobody has thought about doing that before. At least I don't have the impression, from reading the scripts. -- Yves Goergen "LonelyPixel" <[EMAIL PROTECTED]> http://beta.unclassified.de - My web laboratory. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
RE: How to move the MySQL data directory?
Hi Yves, You could also have changed the directory in the global /etc/my.cnf file by setting datadir=/path/to/mysql/data This is pretty simple and works a lot easier than hacking the init scripts. Regards --- ** _/ ** David Logan *** _/ *** ITO Delivery Specialist - Database *_/* Hewlett-Packard Australia Ltd _/_/_/ _/_/_/ E-Mail: [EMAIL PROTECTED] _/ _/ _/ _/ Desk: +618 8408 4273 _/ _/ _/_/_/ Mobile: 0417 268 665 *_/ ** ** _/ Postal: 148 Frome Street, _/ ** Adelaide SA 5001 Australia invent --- -Original Message- From: Yves Goergen [mailto:[EMAIL PROTECTED] Sent: Wednesday, 3 May 2006 8:01 PM To: paul rivers Cc: mysql@lists.mysql.com Subject: Re: How to move the MySQL data directory? On 03.05.2006 01:21 (+0100), paul rivers wrote: > Specify the data dir in the local my.cnf and be sure your instance uses it > by starting it with the --defaults-file parameter set to that instance's > local copy. Okay, since hacking seems to be required anyway, I hacked it the straight-forward and least-change way. I already had datadir=... changed in the init script to the correct location. Now I also insert some variables corrections in bin/mysqld_safe: # here are the lines where ledir is set totally wrong... MY_BASEDIR_VERSION=`pwd` ledir=${MY_BASEDIR_VERSION}/bin DATADIR=`pwd | sed -r "s;/usr/local/;/var/;"`/data defaults="--defaults-file=${DATADIR}/my.cnf" # user=... and so on This does the job pretty well for MySQL 4.0. Need to do it with every upgrade, but I think I can automate it. MySQL 5.0 required a less invasive hack though. I saw that setting datadir= in the proposed init script is for nothing at the very beginning since it's overwritten again right below. So moving that line further down helped. Then the mysqld_safe call in the 'start' section required an additional parameter --defaults-file=$datadir/my.cnf to make it read my socket name, IP & port etc. Now both servers are up and running fine again, side by side, with the *entire* data directory moved somewhere else, saving me from handling that with every upgrade. Thanks for your help, I thought it could be done an easy way but it seems nobody has thought about doing that before. At least I don't have the impression, from reading the scripts. -- Yves Goergen "LonelyPixel" <[EMAIL PROTECTED]> http://beta.unclassified.de - My web laboratory. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: How to move the MySQL data directory?
On 03.05.2006 01:21 (+0100), paul rivers wrote: > Specify the data dir in the local my.cnf and be sure your instance uses it > by starting it with the --defaults-file parameter set to that instance's > local copy. Okay, since hacking seems to be required anyway, I hacked it the straight-forward and least-change way. I already had datadir=... changed in the init script to the correct location. Now I also insert some variables corrections in bin/mysqld_safe: # here are the lines where ledir is set totally wrong... MY_BASEDIR_VERSION=`pwd` ledir=${MY_BASEDIR_VERSION}/bin DATADIR=`pwd | sed -r "s;/usr/local/;/var/;"`/data defaults="--defaults-file=${DATADIR}/my.cnf" # user=... and so on This does the job pretty well for MySQL 4.0. Need to do it with every upgrade, but I think I can automate it. MySQL 5.0 required a less invasive hack though. I saw that setting datadir= in the proposed init script is for nothing at the very beginning since it's overwritten again right below. So moving that line further down helped. Then the mysqld_safe call in the 'start' section required an additional parameter --defaults-file=$datadir/my.cnf to make it read my socket name, IP & port etc. Now both servers are up and running fine again, side by side, with the *entire* data directory moved somewhere else, saving me from handling that with every upgrade. Thanks for your help, I thought it could be done an easy way but it seems nobody has thought about doing that before. At least I don't have the impression, from reading the scripts. -- Yves Goergen "LonelyPixel" <[EMAIL PROTECTED]> http://beta.unclassified.de – My web laboratory. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
RE: How to move the MySQL data directory?
Specify the data dir in the local my.cnf and be sure your instance uses it by starting it with the --defaults-file parameter set to that instance's local copy. Regards, Paul -Original Message- From: Yves Goergen [mailto:[EMAIL PROTECTED] Sent: Tuesday, May 02, 2006 3:11 PM To: Dan Buettner Cc: mysql@lists.mysql.com Subject: Re: How to move the MySQL data directory? On 02.05.2006 22:24 (+0100), Dan Buettner wrote: > The easiest way might be to tell mysql in the config file where to > look for the data directory. > > In your my.cnf file (typically /etc/my.cnf) under the [mysqld] section: > > datadir = /Volumes/mysql-data/data One of the main problems with a global config file is that I am running two servers on the same machine (MySQL 4.0 and 5.0, each with separate data directories of course). Currently I am using config files (my.cnf) in each server's data directory, but telling the server about another datadir inside that other datadir is obiously not reasonable. -- Yves Goergen "LonelyPixel" <[EMAIL PROTECTED]> http://beta.unclassified.de - My web laboratory. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: How to move the MySQL data directory?
On 02.05.2006 22:24 (+0100), Dan Buettner wrote: > The easiest way might be to tell mysql in the config file where to > look for the data directory. > > In your my.cnf file (typically /etc/my.cnf) under the [mysqld] section: > > datadir = /Volumes/mysql-data/data One of the main problems with a global config file is that I am running two servers on the same machine (MySQL 4.0 and 5.0, each with separate data directories of course). Currently I am using config files (my.cnf) in each server's data directory, but telling the server about another datadir inside that other datadir is obiously not reasonable. -- Yves Goergen "LonelyPixel" <[EMAIL PROTECTED]> http://beta.unclassified.de – My web laboratory. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: How to move the MySQL data directory?
The easiest way might be to tell mysql in the config file where to look for the data directory. In your my.cnf file (typically /etc/my.cnf) under the [mysqld] section: datadir = /Volumes/mysql-data/data Dan -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: How to move the MySQL data directory?
Well, moving the datadir to the new MySQL 5.0.21 directory, messing around with all the stupid symlinks, it seems I have finally managed to delete that datadir... It was empty anyway, yet, but this is an extremely dangerous task. So I really need to move the datadir to a safe place, outside all that symlinked chaos. With that done, what is the proposed upgrade method anyway? 1. unpack the tarball to /usr/local/mysql-$version 2. chown root:mysql it all (what for, actually?) 3. stop the server 4. update the symlink /usr/local/mysql5 to the new directory 5. start the server Would that be okay? -- Yves Goergen "LonelyPixel" <[EMAIL PROTECTED]> http://beta.unclassified.de – My web laboratory. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
How to move the MySQL data directory?
Hello, I've just wanted to update MySQL 5.0 on my test machine that will be a productive server very soon. But upgrading MySQL like installing it after MySQL's guide brings a problem: I'd need to move the data directory to the new programme directory every time. So I want to move the datadir outside the application's directory, from /usr/local/mysql5/data (with mysql5 being a symlink to mysql-5.0.xx-...) to /var/mysql5/data. So I moved the entire data directory to the new location and tried to start the MySQL server. After a while printing out dots, it says "ERROR!" and that's it. When I have tried it with MySQL 4.0 and after adding some more of the suppressed output to the scripts, it seems like the startup script expects at least the "mysql" database to be located inside $basedir/data/mysql which of course is not what I meant to do. Is this true that MySQL wants all its databases to be inside the programme directory? Is there any other way to move the datadir out there without hacking all the scripts - over and over with each update? (Then I could just as well move the datadir each time...) -- Yves Goergen "LonelyPixel" <[EMAIL PROTECTED]> http://beta.unclassified.de – My web laboratory. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: (Errcode: 13) after moving data directory
boll wrote: Dominik Klein wrote: Did you check FAT-permissions? When mounting a FAT-partition, you have to set explicit permissions while mounting as FAT does not understand the unix permission concept. Try to mount this way: mount -t vfat -o uid=mysql,gid=mysql,rw,umask=007 /dev/[yourdevicename] /your/mountpoint Hi Dominik, In /etc/fstab the partition is mounted with this line: /dev/hdb2/mnt/FATvfatuid=27,gid=27,umask=000 0 0 ...which I think is the same as what you recommend (uid 27 is "mysql") . What I really don't understand is: Why mysqld will start up and use the dataq on the FAT partition (as I want it to do) if I start it with "mysqld_safe", but when I boot the computer or try, as root, "service mysqld start", it fails to start with these log errors: 060421 08:43:10 mysqld started 060421 8:43:11 [Warning] Can't create test file /mnt/FAT/mysqldata/localhost.lower-test /usr/libexec/mysqld: Can't change dir to '/mnt/FAT/mysqldata/' (Errcode: 13) 060421 8:43:11 [ERROR] Aborting I'm guessing that since mysqld_safe runs as user mysql, maybe mysqld runs as a different user? How would I find that out? I will keep reading the manual, but will be grateful for any ideas. I was able to get mysqld to start at boot, by disabling selinux. Not happy to do it that way, but couldn't find any alternative. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: (Errcode: 13) after moving data directory
Dominik Klein wrote: Did you check FAT-permissions? When mounting a FAT-partition, you have to set explicit permissions while mounting as FAT does not understand the unix permission concept. Try to mount this way: mount -t vfat -o uid=mysql,gid=mysql,rw,umask=007 /dev/[yourdevicename] /your/mountpoint Hi Dominik, In /etc/fstab the partition is mounted with this line: /dev/hdb2/mnt/FATvfatuid=27,gid=27,umask=000 0 0 ...which I think is the same as what you recommend (uid 27 is "mysql") . What I really don't understand is: Why mysqld will start up and use the dataq on the FAT partition (as I want it to do) if I start it with "mysqld_safe", but when I boot the computer or try, as root, "service mysqld start", it fails to start with these log errors: 060421 08:43:10 mysqld started 060421 8:43:11 [Warning] Can't create test file /mnt/FAT/mysqldata/localhost.lower-test /usr/libexec/mysqld: Can't change dir to '/mnt/FAT/mysqldata/' (Errcode: 13) 060421 8:43:11 [ERROR] Aborting I'm guessing that since mysqld_safe runs as user mysql, maybe mysqld runs as a different user? How would I find that out? I will keep reading the manual, but will be grateful for any ideas. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: (Errcode: 13) after moving data directory
boll schrieb: Hi- Using MySQL 4.1.11 on Fedora 4. I moved my data directory to a FAT partition in order to share it with Windows dual-boot. Now when I try to start mysqld normally, it fails with these messages in the log: 060420 18:16:03 mysqld started 060420 18:16:03 [Warning] Can't create test file /mnt/FAT/mysqldata/localhost.lower-test /usr/libexec/mysqld: Can't change dir to '/mnt/FAT/mysqldata/' (Errcode: 13) 060420 18:16:03 [ERROR] Aborting However, I can start mysqld using: mysqld_safe, so I know it's possible. Any suggestions? Thanks in advance. Did you check FAT-permissions? When mounting a FAT-partition, you have to set explicit permissions while mounting as FAT does not understand the unix permission concept. Try to mount this way: mount -t vfat -o uid=mysql,gid=mysql,rw,umask=007 /dev/[yourdevicename] /your/mountpoint Then it should work. Regards, Dominik -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
(Errcode: 13) after moving data directory
Hi- Using MySQL 4.1.11 on Fedora 4. I moved my data directory to a FAT partition in order to share it with Windows dual-boot. Now when I try to start mysqld normally, it fails with these messages in the log: 060420 18:16:03 mysqld started 060420 18:16:03 [Warning] Can't create test file /mnt/FAT/mysqldata/localhost.lower-test /usr/libexec/mysqld: Can't change dir to '/mnt/FAT/mysqldata/' (Errcode: 13) 060420 18:16:03 [ERROR] Aborting However, I can start mysqld using: mysqld_safe, so I know it's possible. Any suggestions? Thanks in advance. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: setting the data directory.
Adam Alkins wrote: Hi, There's a mysqld startup option --datadir=/path/to/data which you can use to alter your data directory. Simply adjust your startup scripts to suite. Regards, -Adam On 1/31/06, Scott Johnson <[EMAIL PROTECTED]> wrote: Hi All, I am trying to find out how to change the location of the data files. I have not yet found a generic entry for the my.conf file to set a data and log location. Can I move the exiting data directory form the mySQL tree and put a soft link to a new location on another partition? thanks, Scott Johnson [EMAIL PROTECTED] Tel.: (514) 917-4922 Fax: (514) 673-0011 -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED] -- Adam Alkins http://www.rasadam.com Hi Scott and Adam, You don't even have to modify the startup scripts, just add datadir=/path/to/mysql/stuff to the my.cnf file and it will point to there. Regards -- David Logan South Australia when in trouble, or in doubt run in circles, scream and shout
Re: setting the data directory.
Hi, There's a mysqld startup option --datadir=/path/to/data which you can use to alter your data directory. Simply adjust your startup scripts to suite. Regards, -Adam On 1/31/06, Scott Johnson <[EMAIL PROTECTED]> wrote: > Hi All, > > I am trying to find out how to change the location of the data files. I have > not yet found a generic entry for the my.conf file to set a data and log > location. > > Can I move the exiting data directory form the mySQL tree and put a soft > link to a new location on another partition? > > thanks, > > Scott Johnson > [EMAIL PROTECTED] > Tel.: (514) 917-4922 > Fax: (514) 673-0011 > > > > -- > MySQL General Mailing List > For list archives: http://lists.mysql.com/mysql > To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED] > > -- Adam Alkins http://www.rasadam.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
setting the data directory.
Hi All, I am trying to find out how to change the location of the data files. I have not yet found a generic entry for the my.conf file to set a data and log location. Can I move the exiting data directory form the mySQL tree and put a soft link to a new location on another partition? thanks, Scott Johnson [EMAIL PROTECTED] Tel.: (514) 917-4922 Fax: (514) 673-0011 -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
RE: Newbie Query: Error starting MySQL..changed Data Directory
>>Running /etc/rc.d/init.d/mysqld start says that mysql start failed BUT This doesn't nesessarily mean that mysql hasn't started. This script waits only for certain time to check if mysql has started or not. If it is not started in that time, it simply says 'mysql start failed'. But mysql may take some more time to come up. So the best practice is to have a look at the logs (as you rightly did) to find out what exactly is going on. And your logs anyway are saying "/usr/libexec/mysqld: ready for connections.". This means that mysql has started without any problems and waiting for connections. >>ps -aux shows that mysql is running And for the same reason I mentioned above, you are seeing this. Hope this helps. sujay -Original Message- From: Sanjay Arora [mailto:[EMAIL PROTECTED] Sent: Monday, November 14, 2005 4:46 PM To: MySql Mailing List Subject: Newbie Query: Error starting MySQL..changed Data Directory Hi all First usage of MySQL. Newbie in Linux as well as MySQL. Using CentOS 4.2 with MySQL 4.1.12, rpm install. Changed the data directory. My /etc/my.conf [mysqld] datadir=/home.dbdata/mysql socket=/home.dbdata/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=/var/lib [mysqld_safe] err-log=/var/log/mysqld.log pid-file=/var/run/mysqld/mysqld.pid Ran these commands for permissions: chown -R mysql:mysql /home.dbdata/mysql chmod -R go-rwx /home.dbdata/mysql Running /etc/rc.d/init.d/mysqld start says that mysql start failed BUT ps -aux shows that mysql is running 0:00 /bin/sh /usr/bin/mysqld_safe --defaults-file=/etc/my.cnf --pidmysql 6184 0.2 3.4 125808 17636 pts/0 Sl 15:47 0:01 /usr/libexec/mysqld --defaults-file=/etc/my.cnf --basedir=/usrroot 6336 0.0 0.1 2920 744 pts/0R+ 15:57 0:00 ps -aux Log shows 051114 14:51:07 mysqld started 051114 14:51:08 InnoDB: Started; log sequence number 0 43634 /usr/libexec/mysqld: ready for connections. Version: '4.1.12' socket: '/home.dbdata/mysql/mysql.sock' port: 3306 Source distribution 051114 15:47:06 [Note] /usr/libexec/mysqld: Normal shutdown 051114 15:47:06 InnoDB: Starting shutdown... 051114 15:47:09 InnoDB: Shutdown completed; log sequence number 0 43634 051114 15:47:09 [Note] /usr/libexec/mysqld: Shutdown complete 051114 15:47:09 mysqld ended 051114 15:47:33 mysqld started 051114 15:47:33 InnoDB: Started; log sequence number 0 43634 /usr/libexec/mysqld: ready for connections. Version: '4.1.12' socket: '/home.dbdata/mysql/mysql.sock' port: 3306 Source distribution Please advise what I have done wrong. I suspect permissions &/or incorrect data directory migration. Please help. With regards. Sanjay. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Newbie Query: Error starting MySQL..changed Data Directory
Hi all First usage of MySQL. Newbie in Linux as well as MySQL. Using CentOS 4.2 with MySQL 4.1.12, rpm install. Changed the data directory. My /etc/my.conf [mysqld] datadir=/home.dbdata/mysql socket=/home.dbdata/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=/var/lib [mysqld_safe] err-log=/var/log/mysqld.log pid-file=/var/run/mysqld/mysqld.pid Ran these commands for permissions: chown -R mysql:mysql /home.dbdata/mysql chmod -R go-rwx /home.dbdata/mysql Running /etc/rc.d/init.d/mysqld start says that mysql start failed BUT ps -aux shows that mysql is running 0:00 /bin/sh /usr/bin/mysqld_safe --defaults-file=/etc/my.cnf --pidmysql 6184 0.2 3.4 125808 17636 pts/0 Sl 15:47 0:01 /usr/libexec/mysqld --defaults-file=/etc/my.cnf --basedir=/usrroot 6336 0.0 0.1 2920 744 pts/0R+ 15:57 0:00 ps -aux Log shows 051114 14:51:07 mysqld started 051114 14:51:08 InnoDB: Started; log sequence number 0 43634 /usr/libexec/mysqld: ready for connections. Version: '4.1.12' socket: '/home.dbdata/mysql/mysql.sock' port: 3306 Source distribution 051114 15:47:06 [Note] /usr/libexec/mysqld: Normal shutdown 051114 15:47:06 InnoDB: Starting shutdown... 051114 15:47:09 InnoDB: Shutdown completed; log sequence number 0 43634 051114 15:47:09 [Note] /usr/libexec/mysqld: Shutdown complete 051114 15:47:09 mysqld ended 051114 15:47:33 mysqld started 051114 15:47:33 InnoDB: Started; log sequence number 0 43634 /usr/libexec/mysqld: ready for connections. Version: '4.1.12' socket: '/home.dbdata/mysql/mysql.sock' port: 3306 Source distribution Please advise what I have done wrong. I suspect permissions &/or incorrect data directory migration. Please help. With regards. Sanjay. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Problem starting MySQL With Moved Data Directory
Hello. > and restarted MySQL with /etc/init.d/mysql start, I get the following: > > Starting MySQL database server: mysqld. > Checking for crashed MySQL tables in the background. > /usr/bin/mysqladmin: connect to server at 'localhost' failed > error: 'Access denied for user: '[EMAIL PROTECTED]' (Using password: > YES)' Is there something in MySQL error log? See: http://dev.mysql.com/doc/refman/5.0/en/error-access-denied.html http://dev.mysql.com/doc/mysql/en/Error_log.html Hal Vaughan wrote: > I'm using MySQL 4.0.24-10 on Debian Sarge (Linux, and the stable branch of > Debian, just to clarify). I had a setup of a program I've been working on > for several years that is on a RAID. I changed MySQL's data directory so it > will be on the same RAID and backed up, along with all my other data and > programs. Originally this was set up under a Debian-based distro that was > based on the testing and unstable branches of Debian. Before putting the > server into production, I wanted to change it to Debian Stable (Sarge) for > safety. (I'll sleep easier at night if it's on Sarge with regular security > updates than depending on unstable packages!) > > So I backed up all the data on the RAID, wiped the original boot/system > drive, > installed Debian Sarge, did an fsck on the RAID, found errors, wiped it out, > restored the original data, including the MySQL db files. When I installed > MySQL on the re-done system, it worked. When altered the line > in /etc/mysql/my.cnf from: > > datadir = /var/lib/mysql > > to: > > datadir = /thresh/tNet/db > > and restarted MySQL with /etc/init.d/mysql start, I get the following: > > Starting MySQL database server: mysqld. > Checking for crashed MySQL tables in the background. > /usr/bin/mysqladmin: connect to server at 'localhost' failed > error: 'Access denied for user: '[EMAIL PROTECTED]' (Using password: > YES)' > /usr/bin/mysqladmin: connect to server at 'localhost' failed > error: 'Access denied for user: '[EMAIL PROTECTED]' (Using password: > YES)' > > However, after I got this, I entered "mysql" and got a connection. The > databases and tables seemed intact. > > I checked, and it turned out that somewhere in the backup/restore process the > ownership of the files was changed. I went through and changed the ownership > of /thresh/tNet/db to mysql:mysql and changed the ownership > of /thresh/tNet/db/mysql to mysql:root. Basically, I changed the ownership > of the files in the new data directory to match what I found > in /var/lib/mysql, then I stopped and restarted MySQL. I still got the same > error messages. > > While MySQL is working, I don't want to do anything with it because I'm not > clear why debian-sys-maint needs access, as opposed to just the user mysql. > To test, I made sure all the files from the db directory on down were set for > all to read and write and all directories set for all to read, write, and > execute. That doesn't help. > > So what is wrong, what do I need to do, and why didn't I get this error when > using the same database directory before? > > Thanks for any help! > > Hal > -- For technical support contracts, goto https://order.mysql.com/?ref=ensita This email is sponsored by Ensita.NET http://www.ensita.net/ __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Gleb Paharenko / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.NET <___/ www.mysql.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Problem starting MySQL With Moved Data Directory
I'm using MySQL 4.0.24-10 on Debian Sarge (Linux, and the stable branch of Debian, just to clarify). I had a setup of a program I've been working on for several years that is on a RAID. I changed MySQL's data directory so it will be on the same RAID and backed up, along with all my other data and programs. Originally this was set up under a Debian-based distro that was based on the testing and unstable branches of Debian. Before putting the server into production, I wanted to change it to Debian Stable (Sarge) for safety. (I'll sleep easier at night if it's on Sarge with regular security updates than depending on unstable packages!) So I backed up all the data on the RAID, wiped the original boot/system drive, installed Debian Sarge, did an fsck on the RAID, found errors, wiped it out, restored the original data, including the MySQL db files. When I installed MySQL on the re-done system, it worked. When altered the line in /etc/mysql/my.cnf from: datadir = /var/lib/mysql to: datadir = /thresh/tNet/db and restarted MySQL with /etc/init.d/mysql start, I get the following: Starting MySQL database server: mysqld. Checking for crashed MySQL tables in the background. /usr/bin/mysqladmin: connect to server at 'localhost' failed error: 'Access denied for user: '[EMAIL PROTECTED]' (Using password: YES)' /usr/bin/mysqladmin: connect to server at 'localhost' failed error: 'Access denied for user: '[EMAIL PROTECTED]' (Using password: YES)' However, after I got this, I entered "mysql" and got a connection. The databases and tables seemed intact. I checked, and it turned out that somewhere in the backup/restore process the ownership of the files was changed. I went through and changed the ownership of /thresh/tNet/db to mysql:mysql and changed the ownership of /thresh/tNet/db/mysql to mysql:root. Basically, I changed the ownership of the files in the new data directory to match what I found in /var/lib/mysql, then I stopped and restarted MySQL. I still got the same error messages. While MySQL is working, I don't want to do anything with it because I'm not clear why debian-sys-maint needs access, as opposed to just the user mysql. To test, I made sure all the files from the db directory on down were set for all to read and write and all directories set for all to read, write, and execute. That doesn't help. So what is wrong, what do I need to do, and why didn't I get this error when using the same database directory before? Thanks for any help! Hal -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Read Only Data Directory
Hey, sorry everyone - I figured it out. I had to add the following to my.cnf read-only skip-innodb I guess I shoulda kept googling before asking... mybad. /JP On 9/21/05, Jake Peavy <[EMAIL PROTECTED]> wrote: > > Hey yall, > I'm trying to use a DVD (containing a number of packed MyISAM tables in a > directory) as the datadir in my my.cnf but I can't start the server: > mysqld is trying to write to the datadir - error log, etc - and when it > can't the server craters. > Is there anyway of using a readonly directory as the datadir? Are there > other options I can specify in my.cnf where I can tell mysqld to write the > error files/etc? > TIA, > Jake >
Read Only Data Directory
Hey yall, I'm trying to use a DVD (containing a number of packed MyISAM tables in a directory) as the datadir in my my.cnf but I can't start the server: mysqld is trying to write to the datadir - error log, etc - and when it can't the server craters. Is there anyway of using a readonly directory as the datadir? Are there other options I can specify in my.cnf where I can tell mysqld to write the error files/etc? TIA, Jake
Re: data directory for mysql
> Hi all, > > I have been using /var/mysql/data as my data directory till now , > suddenly i realise its all filled up with some 20M left which will > finish in a day or two , repartioning my disks is not an option , what > do i do to restart mysql with a new data directory say > /usr/local/mysql/data/: changing the file my.cnf is not helping in my > case, the data is going to the same directory again and not the one i > specified in my.cnf > > TIA > > > Aut disce Aut Discede Aut Vincere Aut Mori > Either learn or leave Either conquer or die > Digz > > > You could also jut move the data to /usr/local/mysql/data/ and create a symbolic link to it from /var/mysql/data Best regards, Andras Kende http://www.kende.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
data directory for mysql
Hi all, I have been using /var/mysql/data as my data directory till now , suddenly i realise its all filled up with some 20M left which will finish in a day or two , repartioning my disks is not an option , what do i do to restart mysql with a new data directory say /usr/local/mysql/data/: changing the file my.cnf is not helping in my case, the data is going to the same directory again and not the one i specified in my.cnf TIA Aut disce Aut Discede Aut Vincere Aut Mori Either learn or leave Either conquer or die Digz -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
RE: Changing Data Directory
Just an FYI, but you can also specify at startup of mysqld by passing the "--datadir" option. This will override what is in your option file, until the next restart. > -Original Message- > From: Arunas Milašauskas [mailto:[EMAIL PROTECTED] > Sent: Wednesday, November 12, 2003 8:26 AM > To: [EMAIL PROTECTED] > Subject: RE: Changing Data Directory > > > in my.cnf: > [mysqld] > datadir=/var/lib/mysql > > > -Original Message- > From: Daniel Kiss [mailto:[EMAIL PROTECTED] > Sent: Wednesday, November 12, 2003 3:21 PM > To: [EMAIL PROTECTED] > Subject: Changing Data Directory > > > Hi all, > > How can I change the directory of the databases? > I have tries the basedir switch in the my.cnf [mysqld] section, but it > did not work. > How should I do it? > > Thanks, > > > > -- > MySQL General Mailing List > For list archives: http://lists.mysql.com/mysql > To unsubscribe: > http://lists.mysql.com/[EMAIL PROTECTED] > > > -- > MySQL General Mailing List > For list archives: http://lists.mysql.com/mysql > To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED] > > > > -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
RE: Changing Data Directory
in my.cnf: [mysqld] datadir=/var/lib/mysql -Original Message- From: Daniel Kiss [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 12, 2003 3:21 PM To: [EMAIL PROTECTED] Subject: Changing Data Directory Hi all, How can I change the directory of the databases? I have tries the basedir switch in the my.cnf [mysqld] section, but it did not work. How should I do it? Thanks, -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Changing Data Directory
Hi all, How can I change the directory of the databases? I have tries the basedir switch in the my.cnf [mysqld] section, but it did not work. How should I do it? Thanks, -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
RE: Changing the data directory.
> At 4:22 PM -0400 9/19/03, Jeff McKeon wrote: > >We've got mysql 3.23 installed on a redhat system via the rpm's that > >come with RedHat 8.0. I'd like to change the default data > directory so > >something other than /var/lib/mysql. I know this is supposed to be > >possible with a start switch of --datadir=/path/to/data but > it doesn't > >seem to work. > > It should work. > Perhaps I'm putting the switch in incorrectly then because when I do... /etc/init.d/mysqld --datadir=/path/to/data And then do... Mysqladmin variables The output says the data directory is the default /var/lib/mysql/ > > > >The startup of mysql uses the /etc/init.d/mysqld script so I suppose > >I'll need to change something in that and add the switch, I > just can't > >seem to figure out where. > > I wouldn't change the script, it'll get overwritten if you upgrade. > > You might try editing /etc/my.cnf (create it if it doesn't > exist) and add this to it: > > [mysqld] > datadir=/path/to/data > This I tried and the results were that the server didn't start properly... Changed the my.cnf to: [mysqld] datadir=/DATA/mysql/data socket=/var/lib/mysql/mysql.sock [mysql.server] user=mysql basedir=/var/lib [safe_mysqld] err-log=/var/log/mysqld.log pid-file=/var/run/mysqld/mysqld.pid Stopped and started mysqld: [EMAIL PROTECTED] root]# /etc/init.d/mysqld stop Stopping MySQL:[ OK ] [EMAIL PROTECTED] root]# /etc/init.d/mysqld start Starting MySQL:[ OK ] [EMAIL PROTECTED] root]# mysqladmin variables mysqladmin: connect to server at 'localhost' failed error: 'Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)' Check that mysqld is running and that the socket: '/var/lib/mysql/mysql.sock' exists! > Alternatively, rename /var/lib/mysql to something else (or > remove it) and recreate /var/lib/mysql as a symlink to > where you really want the data directory. Make sure the > target of the symlink exists. > > > > >Any suggestions? > > > >Thanks, > > > >Jeff > > > -- > Paul DuBois, Senior Technical Writer > Madison, Wisconsin, USA > MySQL AB, www.mysql.com > > Are you MySQL certified? http://www.mysql.com/certification/ > > -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Changing the data directory.
At 4:22 PM -0400 9/19/03, Jeff McKeon wrote: We've got mysql 3.23 installed on a redhat system via the rpm's that come with RedHat 8.0. I'd like to change the default data directory so something other than /var/lib/mysql. I know this is supposed to be possible with a start switch of --datadir=/path/to/data but it doesn't seem to work. It should work. The startup of mysql uses the /etc/init.d/mysqld script so I suppose I'll need to change something in that and add the switch, I just can't seem to figure out where. I wouldn't change the script, it'll get overwritten if you upgrade. You might try editing /etc/my.cnf (create it if it doesn't exist) and add this to it: [mysqld] datadir=/path/to/data Alternatively, rename /var/lib/mysql to something else (or remove it) and recreate /var/lib/mysql as a symlink to where you really want the data directory. Make sure the target of the symlink exists. Any suggestions? Thanks, Jeff -- Paul DuBois, Senior Technical Writer Madison, Wisconsin, USA MySQL AB, www.mysql.com Are you MySQL certified? http://www.mysql.com/certification/ -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Changing the data directory.
We've got mysql 3.23 installed on a redhat system via the rpm's that come with RedHat 8.0. I'd like to change the default data directory so something other than /var/lib/mysql. I know this is supposed to be possible with a start switch of --datadir=/path/to/data but it doesn't seem to work. The startup of mysql uses the /etc/init.d/mysqld script so I suppose I'll need to change something in that and add the switch, I just can't seem to figure out where. Any suggestions? Thanks, Jeff -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: how to change default data directory
thanks for the valuable tips sanjay gupta - Original Message - From: "Thierno Cissé" <[EMAIL PROTECTED]> To: "'sanjay gupta'" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Thursday, September 04, 2003 3:50 PM Subject: RE: how to change default data directory > Hi Sanjay, > I see two ways to proceed : > 1 - after install, move or copy (with -R option) your actual datadir > under /var/lib/mysql > (that is to say all the directories located under /var/lib/mysql/*) > to /var1/lib/mysql, > and then modify in your my.cnf the variable > to correspond with the new directory. > NOTE : stop the mysqld daemon before copying or moving directories. > > 2 - before install, configure in your my.cnf the futur directory to use > with the variable ; > then place it under /etc/ - this cause the script > to find in /etc/my.cnf the datadir to use. > After install, you'll see that the directories mysql and test are > placed under > > Hope this help > Thierno6C > > -Original Message- > From: sanjay gupta [mailto:[EMAIL PROTECTED] > Sent: jeudi 4 septembre 2003 09:35 > To: [EMAIL PROTECTED] > Subject: how to change default data directory > > > Hi All , > I am using RH7.1 box . I am preparing to install mysql > 4.0.13. Previously when i installed the mysql the mysql data directory > was /var/lib/mysql . I uninstall the mysql . Now i want my data > directory to be /var1/lib/mysql instead of /var/lib/mysql . I want this > because var1 is mounted to my raid device /dev/md0 and i want mysql > data directory should be /var1 > > any suggestions > > sanjay > > > > -- > MySQL General Mailing List > For list archives: http://lists.mysql.com/mysql > To unsubscribe: > http://lists.mysql.com/[EMAIL PROTECTED] > > -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: how to change default data directory
thanks for valuable tips - Original Message - From: "Egor Egorov" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, September 04, 2003 3:30 PM Subject: Re: how to change default data directory > "sanjay gupta" <[EMAIL PROTECTED]> wrote: > >I am using RH7.1 box . I am preparing to install mysql 4.0.13. > > Previously when i installed the mysql the mysql data directory was > > /var/lib/mysql . I uninstall the mysql . Now i want my data directory to be > > /var1/lib/mysql instead of /var/lib/mysql . I want this because var1 is > > mounted to my raid device /dev/md0 and i want mysql data directory should > > be /var1 > > > > Move databases to the new MySQL data dir. Run mysqld with --datadir=/var1/lib/mysql option or put to the my.cnf > > [mysqld] > datadir=/var1/lib/mysql > > > > -- > For technical support contracts, goto https://order.mysql.com/?ref=ensita > This email is sponsored by Ensita.net http://www.ensita.net/ >__ ___ ___ __ > / |/ /_ __/ __/ __ \/ /Egor Egorov > / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] > /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.net ><___/ www.mysql.com > > > > > -- > MySQL General Mailing List > For list archives: http://lists.mysql.com/mysql > To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED] > > -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
RE: how to change default data directory
Hi Sanjay, I see two ways to proceed : 1 - after install, move or copy (with -R option) your actual datadir under /var/lib/mysql (that is to say all the directories located under /var/lib/mysql/*) to /var1/lib/mysql, and then modify in your my.cnf the variable to correspond with the new directory. NOTE : stop the mysqld daemon before copying or moving directories. 2 - before install, configure in your my.cnf the futur directory to use with the variable ; then place it under /etc/ - this cause the script to find in /etc/my.cnf the datadir to use. After install, you'll see that the directories mysql and test are placed under Hope this help Thierno6C -Original Message- From: sanjay gupta [mailto:[EMAIL PROTECTED] Sent: jeudi 4 septembre 2003 09:35 To: [EMAIL PROTECTED] Subject: how to change default data directory Hi All , I am using RH7.1 box . I am preparing to install mysql 4.0.13. Previously when i installed the mysql the mysql data directory was /var/lib/mysql . I uninstall the mysql . Now i want my data directory to be /var1/lib/mysql instead of /var/lib/mysql . I want this because var1 is mounted to my raid device /dev/md0 and i want mysql data directory should be /var1 any suggestions sanjay -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: how to change default data directory
"sanjay gupta" <[EMAIL PROTECTED]> wrote: >I am using RH7.1 box . I am preparing to install mysql 4.0.13. > Previously when i installed the mysql the mysql data directory was > /var/lib/mysql . I uninstall the mysql . Now i want my data directory to be > /var1/lib/mysql instead of /var/lib/mysql . I want this because var1 is > mounted to my raid device /dev/md0 and i want mysql data directory should > be /var1 > Move databases to the new MySQL data dir. Run mysqld with --datadir=/var1/lib/mysql option or put to the my.cnf [mysqld] datadir=/var1/lib/mysql -- For technical support contracts, goto https://order.mysql.com/?ref=ensita This email is sponsored by Ensita.net http://www.ensita.net/ __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Egor Egorov / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.net <___/ www.mysql.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
how to change default data directory
Hi All , I am using RH7.1 box . I am preparing to install mysql 4.0.13. Previously when i installed the mysql the mysql data directory was /var/lib/mysql . I uninstall the mysql . Now i want my data directory to be /var1/lib/mysql instead of /var/lib/mysql . I want this because var1 is mounted to my raid device /dev/md0 and i want mysql data directory should be /var1 any suggestions sanjay -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: NAS vs SAN for data directory
Avoid NAS... that's like dealing with mysql via NFS ... Internal raid depending on controller type and disk configuration could be faster than an external SAN... But chances are external SAN has alot more scalability as far as adding more controller, cabinets and disks... If it was my choice and you've had great success with SAN's before as mentioned .. stay the route... On Tue, 8 Jul 2003, SAQIB wrote: > Hello All, > > I am trying to decide which storage I should use for the "Data Directory". > My application has lots of 'SELECT's (80%) and fewer > UPDATEs/INSERTs(20 %). > > I have the following choices of Data storage > > 1) Xiotech SAN (66 Mhz FCAL) > 2) NAS > 3) Internal SCSI 3 RAID 5 > > Will I achieve any better performance using one storage vs the other > storage? > > In the past (for about 2 years), I have I used SAN with 33Mhz FCAL, and > the performance has been quite exceptional. And I have encountered no > problems. > > Any suggestions? > Thanks > > Saqib Ali > http://www.xml-dev.com > > > -- > MySQL General Mailing List > For list archives: http://lists.mysql.com/mysql > To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED] > -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
RE: NAS vs SAN for data directory
Well, I would avoid NAS as it introduces unwanted overhead when accessing the data. As for SAN versus the internal RAID5, I am not sure, I would say benchmark the two and see which comes out better, or wait to see if there is anyone out there that has dealt with both. Regards, Mike Hillyer www.vbmysql.com > -Original Message- > From: SAQIB [mailto:[EMAIL PROTECTED] > Sent: Tuesday, July 08, 2003 8:45 AM > To: [EMAIL PROTECTED] > Subject: NAS vs SAN for data directory > > > Hello All, > > I am trying to decide which storage I should use for the > "Data Directory". > My application has lots of 'SELECT's (80%) and fewer > UPDATEs/INSERTs(20 %). > > I have the following choices of Data storage > > 1) Xiotech SAN (66 Mhz FCAL) > 2) NAS > 3) Internal SCSI 3 RAID 5 > > Will I achieve any better performance using one storage vs the other > storage? > > In the past (for about 2 years), I have I used SAN with 33Mhz > FCAL, and > the performance has been quite exceptional. And I have encountered no > problems. > > Any suggestions? > Thanks > > Saqib Ali > http://www.xml-dev.com > > > -- > MySQL General Mailing List > For list archives: http://lists.mysql.com/mysql > To unsubscribe: > http://lists.mysql.com/mysql?> [EMAIL PROTECTED] > > -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
NAS vs SAN for data directory
Hello All, I am trying to decide which storage I should use for the "Data Directory". My application has lots of 'SELECT's (80%) and fewer UPDATEs/INSERTs(20 %). I have the following choices of Data storage 1) Xiotech SAN (66 Mhz FCAL) 2) NAS 3) Internal SCSI 3 RAID 5 Will I achieve any better performance using one storage vs the other storage? In the past (for about 2 years), I have I used SAN with 33Mhz FCAL, and the performance has been quite exceptional. And I have encountered no problems. Any suggestions? Thanks Saqib Ali http://www.xml-dev.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
re: Change default data directory.
On Monday 03 February 2003 00:40, vim m wrote: > Hi: I am new to mysql. I did an rpm install of > ver-3.23.55 on RH 7.1. > > By default the data is stored in /var. Can I change > this option. Take a look at --datadir option of mysqld or you can also specify another location of the data dir in the my.cnf file. -- For technical support contracts, goto https://order.mysql.com/?ref=ensita This email is sponsored by Ensita.net http://www.ensita.net/ __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Egor Egorov / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.net <___/ www.mysql.com - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Change default data directory.
Hi: I am new to mysql. I did an rpm install of ver-3.23.55 on RH 7.1. By default the data is stored in /var. Can I change this option. Thank you. __ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: RedHat 8, mysql-server-3.23.54a-4 and relocating the data directory
Hi, It looks you haven't updated the mysql client configuration. Adding this lines to your my.cnf file should solve the problem. [client] port=3306 socket=/raidarrary2/data/mysql/mysql.sock HTH Dobromir Velev [EMAIL PROTECTED] - Original Message - From: "Michael Pelley" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Saturday, January 18, 2003 16:26 Subject: RedHat 8, mysql-server-3.23.54a-4 and relocating the data directory Hi All! I'm new to the list, but I've been using MySQL under Red Hat for a couple of years now. I'm in the process of setting up a new Red Hat 8 box and I want to change the data directory to a different location (/raidarray2/data/mysql). I've edited the /etc/my.cnf as: [mysqld] datadir=/raidarray2/data/mysql socket=/raidarrary2/data/mysql/mysql.sock [mysql.server] user=mysql basedir=/raidarry2/data I've also checked RedHat's /etc/rc.d/init.d/mysqld file and changed the line datadir="/raidarry2/data/mysql" and restarted the server. Still, I keep getting the error Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) On the command line, I get the same error with bash_$ mysql -u root -p mysql unless I modify it as bash_$ mysql -u root -p -S /raidarry2/data/mysql/mysql.sock mysql How can I fix this? Is there some other my.cnf file that is being used in RedHat 8? Note that I'm running the version that came with RedHat 8 and has been patched with the up2date command. Thanks! Cheers, Mike -- Mike Pelley "Non illegitimati carborundum" Owner & "Misc. Rambler" of Pelleys.com [EMAIL PROTECTED] - www.pelleys.com - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RedHat 8, mysql-server-3.23.54a-4 and relocating the data directory
Hi All! I'm new to the list, but I've been using MySQL under Red Hat for a couple of years now. I'm in the process of setting up a new Red Hat 8 box and I want to change the data directory to a different location (/raidarray2/data/mysql). I've edited the /etc/my.cnf as: [mysqld] datadir=/raidarray2/data/mysql socket=/raidarrary2/data/mysql/mysql.sock [mysql.server] user=mysql basedir=/raidarry2/data I've also checked RedHat's /etc/rc.d/init.d/mysqld file and changed the line datadir="/raidarry2/data/mysql" and restarted the server. Still, I keep getting the error Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) On the command line, I get the same error with bash_$ mysql -u root -p mysql unless I modify it as bash_$ mysql -u root -p -S /raidarry2/data/mysql/mysql.sock mysql How can I fix this? Is there some other my.cnf file that is being used in RedHat 8? Note that I'm running the version that came with RedHat 8 and has been patched with the up2date command. Thanks! Cheers, Mike -- Mike Pelley "Non illegitimati carborundum" Owner & "Misc. Rambler" of Pelleys.com [EMAIL PROTECTED] - www.pelleys.com - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: data directory in 4.0.9
My dear friend, I suppose that you already done: ./configure --prefix=PATH_OF_THE_MYSQL_APPLICATION After compilation you must do: make install and after this : cd /PATH_OF_THE_MYSQL_APPLICATION/bin and... ./mysql_install_db. Regards, Gelu _ G.NET SOFTWARE COMPANY Permanent e-mail address : [EMAIL PROTECTED] [EMAIL PROTECTED] - Original Message - From: "Defryn, Guy" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, January 16, 2003 4:00 AM Subject: data directory in 4.0.9 > Where does mysql places the databases in 4.0.9 when installing from source? > The var directory does not seem to be there anymore > > > > - > Before posting, please check: >http://www.mysql.com/manual.php (the manual) >http://lists.mysql.com/ (the list archive) > > To request this thread, e-mail <[EMAIL PROTECTED]> > To unsubscribe, e-mail <[EMAIL PROTECTED]> > Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php > > - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
data directory in 4.0.9
Where does mysql places the databases in 4.0.9 when installing from source? The var directory does not seem to be there anymore - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
cannot start server after replacing data directory files
>Description: followed instructions in manual to remove existing files in data directory and replace. on doing so, get errors when i try to start using "sudo safe_mysqld --user=mysql &". error log reads: --- 021210 17:05:07 mysqld started Cannot initialize InnoDB as 'innodb_data_file_path' is not set. If you do not want to use transactional InnoDB tables, add a line skip-innodb to the [mysqld] section of init parameters in your my.cnf or my.ini. If you want to use InnoDB tables, add to the [mysqld] section, for example, innodb_data_file_path = ibdata1:10M:autoextend But to get good performance you should adjust for your hardware the InnoDB startup options listed in section 2 at http://www.innodb.com/ibman.html 021210 17:05:08 /usr/local/mysql/bin/mysqld: Can't find file: './mysql/host.frm' (errno: 13) 021210 17:05:08 mysqld ended --- reason for trying to regenerate files: "hostname" in mac os x gives strange results - so mysql used a temporary dhcp identifier, because i wasn't aware of this peculiarity. obviously this caused problems. after giving "sudo hostname 127.0.0.1", i tried to regenerate the files and restart the server. then the errors. more generally, should one configure hostname to 127.0.0.1 in the /etc/hostconfig file? >How-To-Repeat: just as described above and in the relevant section of the manual. >Fix: >Submitter-Id: >Originator: >Organization: >MySQL support: [none X| licence | email support | extended email support ] >Synopsis: cannot start server after replacing data directory files >Severity: >Priority: >Category: mysql >Class: >Release: mysql-3.23.53-entropy.ch (http://www.entropy.ch/software/macosx/mysql/) >Environment: System: Darwin 127.0.0.1 6.2 Darwin Kernel Version 6.2: Tue Nov 5 22:00:03 PST 2002; root:xnu/xnu-344.12.2.obj~1/RELEASE_PPC Power Macintosh powerpc Mac OS X: 10.2; perl 5.8.0 Some paths: /usr/bin/perl /usr/bin/make /usr/bin/gcc /usr/bin/cc GCC: Reading specs from /usr/libexec/gcc/darwin/ppc/3.1/specs Thread model: posix Apple Computer, Inc. GCC version 1161, based on gcc version 3.1 20020420 (prerelease) Compilation info: CC='gcc' CFLAGS='-DHAVE_BROKEN_REALPATH -lncurses' CXX='g++' CXXFLAGS='' LDFLAGS='' LIBC: lrwxr-xr-x 1 root wheel 15 Dec 2 17:03 /usr/lib/libc.dylib -> libSystem.dylib Configure command: ./configure --prefix=/usr/local/mysql --localstatedir=/usr/local/mysql/data --libdir=/usr/local/mysql/lib --includedir=/usr/local/mysql/include --with-named-z-libs=/usr/local/libz.a --with-innodb --with-server-suffix=-entropy.ch --with-comment=http://www.entropy.ch/software/macosx/mysql/ --with-mysqld-user=mysql --enable-assembler 'CFLAGS=-DHAVE_BROKEN_REALPATH -lncurses' 'CFLAGS=-DHAVE_BROKEN_REALPATH -lncurses' - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
re: re: change the data directory
Julia, Tuesday, December 03, 2002, 10:50:19 PM, you wrote: >> Tuesday, December 03, 2002, 2:24:49 AM, you wrote: >> >> JS> I have just installed the mysql binary on solaris 8. >> JS> I would like have the data go to a different directory than /local/mysql/data. >> JS> How do I get it to do that? >> >> JS> I tried starting it with the --datadir set, but that didn't work. >> JS> I tried setting datadir in the /etc/my.cnf file, but that didn't work. >> JS> I tried making /local/mysql/data a softlink to a different place, but >> JS> that didn't work. >> JS> I tried making /local/mysql/data/mysql a softlink to a different place, but >> JS> that didn't work. >> >> What exactly doesn't work? Could you be more detailed? JS> Here's more detail: JS> I shutdown and added /etc/my.cnf file: JS> kaaawa# more /etc/my.cnf JS> [mysql] JS> datadir = /db_data/mysql_data The section must be [mysqld], not [mysql] JS> hide the installed data directory: JS> kaaawa# mv data data.orig JS> started up again: JS> kaaawa# bin/safe_mysqld --user=mysql & JS> [1] 963 JS> kaaawa# The file /usr/local/mysql/libexec/mysqld doesn't exist or is not executable JS> Please do a cd to the mysql installation directory and restart JS> this script from there as follows: JS> ./bin/safe_mysqld. JS> [1]Exit 1 bin/safe_mysqld --user=mysql JS> kaaawa# JS> Next I shutdown and got rid of /etc/my.cnf JS> I made /local/mysql/mysql-3.23.51/data a link to /db_data/mysql_data JS> lrwxrwxrwx 1 root other 19 Dec 3 10:09 data -> /db_data/mysql_data JS> Try to start up: JS> kaaawa# bin/safe_mysqld --user=mysql & JS> [1] 826 JS> kaaawa# Starting mysqld daemon with databases from /local/mysql/mysql-3.23.51/data JS> 021203 10:10:40 mysqld ended JS> Try making the softlink from /local/mysql/mysql-3.23.51/data/mysql to JS> /db_data/mysql_data and that wouldn't start either: JS> lrwxrwxrwx 1 root other 25 Dec 3 10:17 mysql -> /db_data/mysql_data/mysql JS> kaaawa# bin/safe_mysqld --user=mysql & JS> [1] 896 JS> kaaawa# Starting mysqld daemon with databases from /local/mysql/mysql-3.23.51/data JS> 021203 10:17:40 mysqld ended Julia, if you can't start mysqld, look at the error log file (.err) -- For technical support contracts, goto https://order.mysql.com/?ref=ensita This email is sponsored by Ensita.net http://www.ensita.net/ __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Egor Egorov / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.net <___/ www.mysql.com - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
re: change the data directory
> Julia, > Tuesday, December 03, 2002, 2:24:49 AM, you wrote: > > JS> I have just installed the mysql binary on solaris 8. > JS> I would like have the data go to a different directory than /local/mysql/data. > JS> How do I get it to do that? > > JS> I tried starting it with the --datadir set, but that didn't work. > JS> I tried setting datadir in the /etc/my.cnf file, but that didn't work. > JS> I tried making /local/mysql/data a softlink to a different place, but > JS> that didn't work. > JS> I tried making /local/mysql/data/mysql a softlink to a different place, but > JS> that didn't work. > > What exactly doesn't work? Could you be more detailed? Here's more detail: I shutdown and added /etc/my.cnf file: kaaawa# more /etc/my.cnf [mysql] datadir = /db_data/mysql_data hide the installed data directory: kaaawa# mv data data.orig started up again: kaaawa# bin/safe_mysqld --user=mysql & [1] 963 kaaawa# The file /usr/local/mysql/libexec/mysqld doesn't exist or is not executable Please do a cd to the mysql installation directory and restart this script from there as follows: ./bin/safe_mysqld. [1]Exit 1 bin/safe_mysqld --user=mysql kaaawa# Next I shutdown and got rid of /etc/my.cnf I made /local/mysql/mysql-3.23.51/data a link to /db_data/mysql_data lrwxrwxrwx 1 root other 19 Dec 3 10:09 data -> /db_data/mysql_data Try to start up: kaaawa# bin/safe_mysqld --user=mysql & [1] 826 kaaawa# Starting mysqld daemon with databases from /local/mysql/mysql-3.23.51/data 021203 10:10:40 mysqld ended Try making the softlink from /local/mysql/mysql-3.23.51/data/mysql to /db_data/mysql_data and that wouldn't start either: lrwxrwxrwx 1 root other 25 Dec 3 10:17 mysql -> /db_data/mysql_data/mysql kaaawa# bin/safe_mysqld --user=mysql & [1] 896 kaaawa# Starting mysqld daemon with databases from /local/mysql/mysql-3.23.51/data 021203 10:17:40 mysqld ended Thanks for your help! Julia > - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
re: change the data directory
Julia, Tuesday, December 03, 2002, 2:24:49 AM, you wrote: JS> I have just installed the mysql binary on solaris 8. JS> I would like have the data go to a different directory than /local/mysql/data. JS> How do I get it to do that? JS> I tried starting it with the --datadir set, but that didn't work. JS> I tried setting datadir in the /etc/my.cnf file, but that didn't work. JS> I tried making /local/mysql/data a softlink to a different place, but JS> that didn't work. JS> I tried making /local/mysql/data/mysql a softlink to a different place, but JS> that didn't work. What exactly doesn't work? Could you be more detailed? -- For technical support contracts, goto https://order.mysql.com/?ref=ensita This email is sponsored by Ensita.net http://www.ensita.net/ __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Egor Egorov / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.net <___/ www.mysql.com - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
change the data directory
I have just installed the mysql binary on solaris 8. I would like have the data go to a different directory than /local/mysql/data. How do I get it to do that? I tried starting it with the --datadir set, but that didn't work. I tried setting datadir in the /etc/my.cnf file, but that didn't work. I tried making /local/mysql/data a softlink to a different place, but that didn't work. I tried making /local/mysql/data/mysql a softlink to a different place, but that didn't work. Thanks! Julia - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Data Directory
Daren, Wednesday, August 14, 2002, 11:49:22 PM, you wrote: DC> My Linux installation only has about 1gb in the /var DC> partition, so I need to relocate my databases to the DC> /home partition. I'm pretty sure the following DC> commands will shutdown mysql, move the data directory, DC> create a symbolic link, and then restart mysql. My DC> question is, is this complete, or do I need to DC> chown/chgrp/chmod the new symbolic link directory? DC> mysqladmin -u root -p shudown DC> mv /var/lib/mysql /home DC> ln -s /home/mysql /var/lib/mysql DC> /etc/rc.d/init.d/mysqld start If you want to have another data dir than /var/lib/mysql you can just specify new data dir with --datadir=# option of mysqld or edit my.cnf file. Don't forget to check permissions on the new data dir. -- For technical support contracts, goto https://order.mysql.com/?ref=ensita This email is sponsored by Ensita.net http://www.ensita.net/ __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Egor Egorov / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.net <___/ www.mysql.com - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Data Directory
What is the purpose of creating the symlink if I manually edit the data directory variable? Would it be better to: a) Move the data, and edit the data directory to the new location b) Move the data, and create a symlink to the new data TIA, --- Rahadul Kabir <[EMAIL PROTECTED]> wrote: > > > Daren Cotter wrote: > > > My Linux installation only has about 1gb in the > /var > > partition, so I need to relocate my databases to > the > > /home partition. I'm pretty sure the following > > commands will shutdown mysql, move the data > directory, > > create a symbolic link, and then restart mysql. > > I think you should also change the datadir value in > /etc/rc.d/init.d/mysql > /usr/bin/safe_mysqld > > set the datadir=/home/mysql or something > > > My > > question is, is this complete, or do I need to > > chown/chgrp/chmod the new symbolic link directory? > > > > nope > > > > > mysqladmin -u root -p shudown > > mv /var/lib/mysql /home > > ln -s /home/mysql /var/lib/mysql > > /etc/rc.d/init.d/mysqld start > > > > Query, SQL > > > > __ > > Do You Yahoo!? > > HotJobs - Search Thousands of New Jobs > > http://www.hotjobs.com > > > > > - > > Before posting, please check: > >http://www.mysql.com/manual.php (the manual) > >http://lists.mysql.com/ (the list > archive) > > > > To request this thread, e-mail > <[EMAIL PROTECTED]> > > To unsubscribe, e-mail > <[EMAIL PROTECTED]> > > Trouble unsubscribing? Try: > http://lists.mysql.com/php/unsubscribe.php > __ Do You Yahoo!? HotJobs - Search Thousands of New Jobs http://www.hotjobs.com - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Data Directory
My Linux installation only has about 1gb in the /var partition, so I need to relocate my databases to the /home partition. I'm pretty sure the following commands will shutdown mysql, move the data directory, create a symbolic link, and then restart mysql. My question is, is this complete, or do I need to chown/chgrp/chmod the new symbolic link directory? mysqladmin -u root -p shudown mv /var/lib/mysql /home ln -s /home/mysql /var/lib/mysql /etc/rc.d/init.d/mysqld start Query, SQL __ Do You Yahoo!? HotJobs - Search Thousands of New Jobs http://www.hotjobs.com - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Changing the data directory
Satish, Friday, July 05, 2002, 9:26:23 PM, you wrote: SS> I am a newbie to MySQL administratation. I just SS> setup MySQL in my linux machine and want to change the SS> data directory from /var/lib/mysql to something else. SS> I put the .my.cnf file in the /etc/ directory and SS> specified the parameter datadir=/home/mysql but it SS> gives me an error invalid option. Any help is SS> appreciated. You should put my.cnf file, not .my.cnf in /etc/ Did you put entry datadir=/home/mysql in the [mysqld] section? -- For technical support contracts, goto https://order.mysql.com/?ref=ensita This email is sponsored by Ensita.net http://www.ensita.net/ __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Victoria Reznichenko / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.net <___/ www.mysql.com - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Changing the data directory
Hi Guys, I am a newbie to MySQL administratation. I just setup MySQL in my linux machine and want to change the data directory from /var/lib/mysql to something else. I put the .my.cnf file in the /etc/ directory and specified the parameter datadir=/home/mysql but it gives me an error invalid option. Any help is appreciated. Thanks Satish = The only person in the world who is enviable is one who does not envy others __ Satish Santhakumar Graduate Student IIT, Chicago and Computer Programmer University of Chicago. __ Do You Yahoo!? Sign up for SBC Yahoo! Dial - First Month Free http://sbc.yahoo.com - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Data Directory
I installed MySQL4.0 source on my redhat7.2 linux server it compiled and make intall fine with no problems execpt that i chose to install it in /databases/mysql/ rather than /usr/local/mysql/ so i did this by typing this instead ./configure --prefix=/database/mysql rather than ./configure --prefix=/usr/local/mysql My problem is, when it was done building and installing, 5 directories were not in the /database/mysql directory but they were in the untared and ungziped directory: the directories are the following scripts,include,support-files,tests,and var. I had to manually copy and paste the directories into the /database/mysql directory. When I executed scripts/mysql_install_db, it ran but the mysql directory was missing mysql/data directory and so was the untared and ungzipped directory basically it was nowhere. Is there something im missing. Thanks Sagine _ Visit our Caribbean Community at http://www.islanderonline.com _ Run a small business? Then you need professional email like [EMAIL PROTECTED] from Everyone.net http://www.everyone.net?tag - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Spontaneous Data Directory Changing
A few weeks ago, my mysql 3.23.46 server spontaneously started changing its data directory to /var/tmp/ once or twice a week, and once or twice a day for a short span. Nothing in the error file. Anyone seen anything like this or have any idea what's going on? I changed the data directory to a completely different location, but it just did it again. Very irritating. Age --- Adriano "Age" Manocchia [EMAIL PROTECTED] Cornell University AIM/Yahoo/MSN: SalsaSharkNet http://salsashark.net/ageICQ: 5962736 --- "The capacity to blunder slightly is the real marvel of DNA. Without this special attribute, we would still be anaerobic bacteria, and there would be no music." -Lewis Thomas - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
data directory
Can the data directory reside on a different machine than the mysql program itself, such as on a maxattach storage device. Thanks, stephen - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: DATA DIRECTORY bug on Win32
Hi! >>>>> "Mike" == Mike Blazer <[EMAIL PROTECTED]> writes: Mike> Miguel Angel SolÕrzano wrote: >> >> At 14:24 24/10/2001 +0400, Mike Blazer wrote: >> Hi Mike, >> >> Thanks for the bug report. >> The explanation why the insert command doesn't works on Win32, >> is because the link file pointing for the DATA DIRECTORY wasn't >> created in the create table command, like the Unix version does. >> The Win32 OSs don't have a native symbolic link feature and the >> today symbolic link support on Win32 is made creating a plain text >> file with the extension *.sym on \data directory and contains the >> path of the whole database. >> Then DATA DIRECTORY feature should be handled in a different way >> on Win32 than is made on Unix. Mike> Thanks, Miguel, I see - but I don't believe that nothing could be done Mike> for Win32. There are explorer shortcut files with the set of Win32 API Mike> calls to read/write them - so, I guess not only directories(databases) Mike> but .MYD and .MYI files could be linked separately. Mike> OK, in fact you could use table_name.MYD.sym and table_name.MYI.sym in Mike> the same way you are using database.sym now - there is a Change/Notify Mike> mechanism that avoids the need to read that .sym files more then once if Mike> they are not changed. But ALTER TABLE and OPTIMIZE TABLE should not Mike> destroy this fake symlink. Mike> Well, I'm sure there are some better ways too - it's a pity that it such Mike> a useful feature fails on Win32. I have now changed MySQL 4.0.1 to ignore any DATA DIRECTORY directives, until we have come up with an acceptable workaround for windows. For the moment, I can't come up with any better solution than to also start supporting .sym files on windows; We plan to in the near future generalize the file handling interface in MySQL; When we do this, we will take this into consideration! Regards, Monty - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: DATA DIRECTORY bug on Win32
Hi! >>>>> "Mike" == Mike Blazer <[EMAIL PROTECTED]> writes: Mike> Well, I'm sure there are some better ways too - it's a pity that it such Mike> a useful feature fails on Win32. >> I have now changed MySQL 4.0.1 to ignore any DATA DIRECTORY >> directives, until we have come up with an acceptable workaround for >> windows. Mike> Oops! Sorry, I hope you removed this feature for Win32 only, because on Mike> *NIX it works perfectly. In fact we already started bulding the new Mike> multi-drive database using this kind of symlinking (on Linux and Mike> Solaris). Yes, we only removed this for windows. Mike> Well, may be I'm missing something - I'm preparing such a huge base for Mike> a 1st time - but except of DATA DIRECTORY it's only RAID mechanism that Mike> lets you use few disks and not fail after OPTIMIZE TABLE. RAID can't help you to use many disks on windows, because you can't symlink directories on windows as you can on Unix. Mike> But Raid has its unpleasant side - it puts all tables to the same Mike> 00,01,02 not to tab1.00, tab2.00 etc. So, you can't actually split the Mike> tables between disks. Parts of all tables will be on all disks. And you Mike> can't move index files at all. And also, if your disks are not equal, Mike> like 8GB and 18GB and all big tables are raid-ed seems like a big part Mike> of the bigger drive will always be empty - beause Raid writes equal Mike> portions of data. RAID was mainly designed to help overcome the 2G limit on old Linux filesystems, not to split things across many disks (even if it can be used for this on Linux). Mike> So, Michael, please, please open the DATA DIRECTORY feature for the Mike> systems that can handle it! It's a life-saving feature. Of course (I never intended to remove this for Unix). Mike> Thanks a lot! Mike> Mike Blazer Regards, Monty - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: DATA DIRECTORY bug on Win32
At 14:24 24/10/2001 +0400, Mike Blazer wrote: Hi Mike, Thanks for the bug report. The explanation why the insert command doesn't works on Win32, is because the link file pointing for the DATA DIRECTORY wasn't created in the create table command, like the Unix version does. The Win32 OSs don't have a native symbolic link feature and the today symbolic link support on Win32 is made creating a plain text file with the extension *.sym on \data directory and contains the path of the whole database. Then DATA DIRECTORY feature should be handled in a different way on Win32 than is made on Unix. Regards, Miguel >Hello guys! >I'm sorry to report a small problem with the newest MySQL-4.0.0 that >looks like a bug for me. >This is a very-very nice and awaited feature DATA/INDEX DIRECTORY in the >CREATE TABLE statement. On my Win95 it creates .MYD file but >immediatelly fails in the 1st INSERT statement reporting > >g:\mysql-4.0.0\bin>mysqlc ranks < G:\_patrick\test1.sql >ERROR 1105 at line 32: File '.\ranks\test1.MYD' not found (Errcode: 2) > >Line 32 is the first INSERT. > >I tried to import an SQL file with > >CREATE TABLE test1 ( >... >)TYPE=MyISAM MAX_ROWS=4294967295 PACK_KEYS=1 > DATA DIRECTORY="G:\\mysql-4.0.0\\data\\r2"; > >INSERT INTO test1 VALUES ('referer - pages per >visitor',998092800,1,1,28,38,6,26); >etc. > >The file was created by mysqldump - so, no errors, I just added > > DATA DIRECTORY="G:\\mysql-4.0.0\\data\\r2"; > >Yes, I tried it both in Win32 and forward-slash form like > > DATA DIRECTORY="G:/temp"; > >same error. > >And it kinda could not understand any relative path at all > > DATA DIRECTORY="./r2"; >gives >ERROR 1103 at line 11: Incorrect table name './r2' > > DATA DIRECTORY="r2"; >gives >ERROR 1103 at line 11: Incorrect table name 'r2' > >In the last two cases even .MYD file has never been created. > >That's it. > >Thanks... and many thanks - to all of you at Mysql AB > >Mike Blazer /Perl developer/ > >- >Before posting, please check: >http://www.mysql.com/manual.php (the manual) >http://lists.mysql.com/ (the list archive) > >To request this thread, e-mail <[EMAIL PROTECTED]> >To unsubscribe, e-mail ><[EMAIL PROTECTED]> >Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php -- For technical support contracts, goto https://order.mysql.com/ __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Miguel A. Solórzano <[EMAIL PROTECTED]> / /|_/ / // /\ \/ /_/ / /__ MySQL AB, FullTime Developer /_/ /_/\_, /___/\___\_\___/ Mogi das Cruzes - São Paulo, Brazil <___/ www.mysql.com - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
can't find my my.cnf or data directory
i can't find my my.cnf or data directory. i am going nuts here...these may seem like stupid questions but i'm not even thinking logically any more... any help is much appreciated. tahnks -powlow - Original Message - From: "powlow" <[EMAIL PROTECTED]> To: "Sasha Pachev" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Wednesday, September 19, 2001 12:25 PM Subject: Re: rpm install error > its actually not an installation problem. just starting the server. > > if i try to run mysqld (not safe-mysqld) i get this message : > > linux:/var/lib/mysql # mysqld > Fatal error: Please read "Security" section of the manual to find out how to > run mysqld as root! > 010919 12:35:58 Aborting > > 010919 12:35:58 mysqld: Shutdown Complete > > i'm looking at the manual now. any comments on this. some stuff seems to be > owned by mysql, some by root... > > -powlow > > - Original Message - > From: "powlow" <[EMAIL PROTECTED]> > To: "Sasha Pachev" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> > Sent: Wednesday, September 19, 2001 11:48 AM > Subject: Re: rpm install error > > > > oops. its suse...damn > > > > still...any ideas? > > > > -powlow > > > > - Original Message - > > From: "powlow" <[EMAIL PROTECTED]> > > To: "Sasha Pachev" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> > > Sent: Wednesday, September 19, 2001 11:17 AM > > Subject: Re: rpm install error > > > > > > > kernel version 2.2 > > > how do i find out my Red Hat version? its not installed through rpm...i > > > think... > > > > > > MySQL-3.23.42-1.i386.rpm > > > MySQL-client-3.23.42-1.i386.rpm > > > MySQL-shared-3.23.42-1.i386.rpm > > > > > > installing shared : no problem > > > when installing client i get : group man does not exist - using root (13 > > > times) > > > installing server : > > > > > > mysqld restarted > > > > > > Number of processes running now: 2 > > > mysqld process hanging, pid 28666 - killed > > > mysqld process hanging, pid 28665 - killed > > > 010919 11:27:22 mysqld restarted > > > /usr/bin/safe_mysqld: line 273: 28693 Segmentation fault > > > $NOHUP_NICENESS $ledir/$MYSQLD > > > $defaults --basedir=$MY_BASEDIR_VERSION --datadir=$DATADIR > > > $USER_OPTION --pid-file=$pid_file --skip-locking >>$err_log 2>&1 > > > > > > restart process number keeps changing, and message keeps repeating... > > > > > > please help!! > > > > > > thanks > > > > > > -paulo > > > > > > - Original Message - > > > From: "Sasha Pachev" <[EMAIL PROTECTED]> > > > To: "powlow" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> > > > Sent: Tuesday, September 18, 2001 2:14 PM > > > Subject: Re: rpm install error > > > > > > > > > > On Tuesday 18 September 2001 03:16, powlow wrote: > > > > > latest rpm on redhat > > > > > MySQL-3.23.42-1.i386.rpm > > > > > > > > > > any ideas? i've installed and compile mysql on other machines before > > and > > > > > never had any problems (appart from sock file which was easily > > solved). > > > > > > > > Provide the output of mysqlbug... > > > > > > > > Also, what version of RedHat? > > > > > > > > -- > > > > MySQL Development Team > > > > For technical support contracts, visit https://order.mysql.com/ > > > >__ ___ ___ __ > > > > / |/ /_ __/ __/ __ \/ / Sasha Pachev <[EMAIL PROTECTED]> > > > > / /|_/ / // /\ \/ /_/ / /__ MySQL AB, http://www.mysql.com/ > > > > /_/ /_/\_, /___/\___\_\___/ Provo, Utah, USA > > > ><___/ > > > > > > > > > - > > > Before posting, please check: > > >http://www.mysql.com/manual.php (the manual) > > >http://lists.mysql.com/ (the list archive) > > > > > > To request this thread, e-mail <[EMAIL PROTECTED]> > > > To unsubscribe, e-mail > > <[EMAIL PROTECTED]> > > > Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php > > > > > > --
Re: data directory.........
If you had read the installation instructions, you would have seen statements that looked like this... cd /usr/local/mysql ./bin/mysql_install_db Make sure that the "var" directory that is created grants access to the 'user' that MySQL is running as... (otherwise I'm sure we'll be getting another Email asking why it still doesn't work...) I'm not being 'sarcastic' or 'disrespectful', it's just that it's almost 1 AM... - Original Message - From: "Usha Rajesh" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, July 27, 2001 12:15 PM Subject: data directory. > Hi, > > I have a problem here. > > I installed mysql-3.23.37 on my linux 2.4.2 i686 box...as specified in the > INSTALL_SOURCE file itself. > > For configure prefix I gave the value of /usr/local/mysql. But, when I see > the directory, everything is present but the data or var directory is > missingI don't have any idea why its happening like that. > > When I run the command "/usr/local/mysql/bin/safe_mysqld, it says mysqld > ended.so, I want to check the hostname.err under the data > directorybut the data dir itself is missing here... > > Someone please tell me what is the problem. > > Thanks, > > Usha- > > > > - > Before posting, please check: >http://www.mysql.com/manual.php (the manual) >http://lists.mysql.com/ (the list archive) > > To request this thread, e-mail <[EMAIL PROTECTED]> > To unsubscribe, e-mail <[EMAIL PROTECTED]> > Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php > - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php