Unknown database error
Hi, I get an Unknown database error when I am trying to connect to mysql using C API. I have created the database in mysql prompt as root: CREATE DATABASE Lr0; I am pretty sure that the problem is a ownership issue, because when I do ls -l in my datadir I get: [javad64@udbl64 data]$ ls -l total 20532 -rw-rw 1 javad64 mysql 10485760 Oct 26 14:10 ibdata1 -rw-rw 1 javad64 mysql 5242880 Oct 26 14:10 ib_logfile0 -rw-rw 1 javad64 mysql 5242880 Oct 19 15:28 ib_logfile1 drwx-- 2 javad64 javad64 4096 Oct 26 14:35 Lr0 drwx-- 2 javad64 mysql 4096 Oct 22 11:04 mysql drwx-- 2 javad64 mysql 4096 Oct 22 11:04 test which shows Lr0 doesn't have mysql ownership. my question is: 1- Why does this happen? While I am creating the database in mysql prompt as root. 2- How can I fix it? I don't have root access in the system I am using so the chown solution is off table. Best regards, Javad Bakhshi, Computer Science M.Sc Department of IT, Uppsala University
Re: Unknown database error
The contents of datadir is typically owned by the mysql user and group. Certain attributes on the datadir itself (ls -ld $datadir) can affect the permissions of newly-created files and directories. You need to talk to you sysadmin, with a eye towards doing something like chown -R mysql:mysql $datadir I honestly cannot think of a scenario where the datadir should be permissioned any other way. On 2012-10-29 6:26 AM, javad bakhshi javadbakh...@yahoo.com wrote: Hi, I get an Unknown database error when I am trying to connect to mysql using C API. I have created the database in mysql prompt as root: CREATE DATABASE Lr0; I am pretty sure that the problem is a ownership issue, because when I do ls -l in my datadir I get: [javad64@udbl64 data]$ ls -l total 20532 -rw-rw 1 javad64 mysql 10485760 Oct 26 14:10 ibdata1 -rw-rw 1 javad64 mysql5242880 Oct 26 14:10 ib_logfile0 -rw-rw 1 javad64 mysql5242880 Oct 19 15:28 ib_logfile1 drwx-- 2 javad64 javad64 4096 Oct 26 14:35 Lr0 drwx-- 2 javad64 mysql 4096 Oct 22 11:04 mysql drwx-- 2 javad64 mysql 4096 Oct 22 11:04 test which shows Lr0 doesn't have mysql ownership. my question is: 1- Why does this happen? While I am creating the database in mysql prompt as root. 2- How can I fix it? I don't have root access in the system I am using so the chown solution is off table. Best regards, Javad Bakhshi, Computer Science M.Sc Department of IT, Uppsala University
weird drop database error
We are getting a weird DROP DATABASE error 2007-06-10 11:25:41 db 527 DEBUGDROP DATABASE BCS OperationalError: (1051, Unknown table 'assignments,chemo,choicelists,dia,forms ,horm,id,permissions,qhistory,qnotes,qstates,questionnaires,r') the thing is, there is NO table 'r' ... can't tell if that's just the truncation of long string, since we do have tables that begin with the letter 'r'. but if its a truncation, which is the offending table, since the ones in the string as shown are there as advertised. also, is that correct that MySQL says 'table' (not plural), but then lists a set of tables??? Has MySQL made itself believe taht string is one long table name. please note: we are acccessing MySQL through the python mysqldb wrapper. but we did simply execute the query 'DROP DATABASE BCS' which i THINK is passed straight through to the MySQL engine. query: does drop database XXX delete tables regardless of foreign key constraints? we are using innodb. but i thought drop database xxx deletes tables with extreme prejudice. but if its a constraint issue, then why the unknown table error? thanks. Les Schaffer -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Importing a database error
Hi I am working with MySql 4.1.14 under Windows XP. I am trying to do a database import from a file. I have the following table definiton CREATE TABLE attribute_instance ( name varchar(200) NOT NULL default '', id int(11) NOT NULL default '0', PRIMARY KEY (id,name), KEY id (id,name), KEY KM_INDEX_ATTRIBUTE_INSTANCE (id), CONSTRAINT `attribute_instance_ibfk_1` FOREIGN KEY (`id`) REFERENCES `read_restring` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) TYPE=InnoDB; When Mysql tries to create this table It shows the following error message : ERROR 1005 (HY000) at line 15: Can't create table '.\x\attribute_instance.frm' ( errno: 150) MySQL error code 150: Foreign key constraint is incorrectly formed It seems to be a foreing key error. But the database was working fine. I only did an export and then I want to import of the same database. Has anybody an idea of this error? Any advice? Thanks in advance and regards Boris Villazón -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Importing a database error
(response interspersed) Boris Villazon [EMAIL PROTECTED] wrote on 10/14/2005 08:30:13 AM: Hi I am working with MySql 4.1.14 under Windows XP. I am trying to do a database import from a file. I have the following table definiton CREATE TABLE attribute_instance ( name varchar(200) NOT NULL default '', id int(11) NOT NULL default '0', PRIMARY KEY (id,name), KEY id (id,name), This index duplicates your primary key and is not needed KEY KM_INDEX_ATTRIBUTE_INSTANCE (id), Your primary key already indexes this column. This index is also not needed. CONSTRAINT `attribute_instance_ibfk_1` FOREIGN KEY (`id`) REFERENCES `read_restring` (`id`) ON DELETE CASCADE ON UPDATE CASCADE Is `read_restring` also an InnoDB table? Is `read_restring`.`id` also indexed? ) TYPE=InnoDB; When Mysql tries to create this table It shows the following error message : ERROR 1005 (HY000) at line 15: Can't create table '.\x\attribute_instance.frm' ( errno: 150) MySQL error code 150: Foreign key constraint is incorrectly formed Is that really what SHOW INNODB STATUS said or is that the output of perror? Whenever working with Innodb, if you get an error always check SHOW INNODB STATUS for more complete details. It seems to be a foreing key error. It is but exactly what was wrong with the foreign key you didn't say. You get that from SHOW INNODB STATUS. At this point in your script, does `read_restring` even exist? If it doesn't, you may need to reorganize your script. If `attribute_instance` has data already in it and at least one row has an `id` value that isn't on `read_restring`, that would also cause an error 150. But the database was working fine. I only did an export and then I want to import of the same database. Has anybody an idea of this error? Any advice? Thanks in advance and regards Boris Villazón Check my comments above and get back to us with the error description from SHOW INNODB STATUS immediately after re-creating the error if you are still having problems. Shawn Green Database Administrator Unimin Corporation - Spruce Pine
Re: Importing a database error
[EMAIL PROTECTED] wrote: (response interspersed) Boris Villazon [EMAIL PROTECTED] wrote on 10/14/2005 08:30:13 AM: Hi I am working with MySql 4.1.14 under Windows XP. I am trying to do a database import from a file. I have the following table definiton CREATE TABLE attribute_instance ( name varchar(200) NOT NULL default '', id int(11) NOT NULL default '0', PRIMARY KEY (id,name), KEY id (id,name), This index duplicates your primary key and is not needed Oki, I will check ... thanks KEY KM_INDEX_ATTRIBUTE_INSTANCE (id), Your primary key already indexes this column. This index is also not needed. Oki, I will check also. CONSTRAINT `attribute_instance_ibfk_1` FOREIGN KEY (`id`) REFERENCES `read_restring` (`id`) ON DELETE CASCADE ON UPDATE CASCADE Is `read_restring` also an InnoDB table? Is `read_restring`.`id` also indexed? Yes, read_restring is also an InnoDB table and `read_restring`.`id` is also indexed. ) TYPE=InnoDB; When Mysql tries to create this table It shows the following error message : ERROR 1005 (HY000) at line 15: Can't create table '.\x\attribute_instance.frm' ( errno: 150) MySQL error code 150: Foreign key constraint is incorrectly formed Is that really what SHOW INNODB STATUS said or is that the output of perror? Whenever working with Innodb, if you get an error always check SHOW INNODB STATUS for more complete details. Show InnoDB status didn't give useful information in this case. It seems to be a foreing key error. It is but exactly what was wrong with the foreign key you didn't say. You get that from SHOW INNODB STATUS. At this point in your script, does `read_restring` even exist? If it doesn't, you may need to reorganize your script. If `attribute_instance` has data already in it and at least one row has an `id` value that isn't on `read_restring`, that would also cause an error 150. Thanks for your tip. I did reorganize my script and everything works fine. But the database was working fine. I only did an export and then I want to import of the same database. Has anybody an idea of this error? Any advice? Thanks in advance and regards Boris Villazón Check my comments above and get back to us with the error description from SHOW INNODB STATUS immediately after re-creating the error if you are still having problems. Thanks and regards Shawn Green Database Administrator Unimin Corporation - Spruce Pine
can't drop database: ERROR 1217
version: mysql Ver 12.22 Distrib 4.0.18, for pc-linux (i686) mysql DROP DATABASE xxx; ERROR 1217: Cannot delete or update a parent row: a foreign key constraint fails what is this all about? how the heck can I drop the database? Dean Hoover -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
RE: can't drop database: ERROR 1217
Dean, Seems your database has a table with foreign key constraints. You need to delete that table first and then you will be able to drop database successfully. Hope that helps!!! Raza -Original Message- From: Dean A. Hoover [mailto:[EMAIL PROTECTED] Sent: Friday, May 14, 2004 4:13 AM To: [EMAIL PROTECTED] Subject: can't drop database: ERROR 1217 version: mysql Ver 12.22 Distrib 4.0.18, for pc-linux (i686) mysql DROP DATABASE xxx; ERROR 1217: Cannot delete or update a parent row: a foreign key constraint fails what is this all about? how the heck can I drop the database? Dean Hoover -- 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]
Possible OT: Unable to make database error...
I'm getting the following error while trying to install PostNuke ver.726 on a w2k3 server that's running IIS6, MySQL 5 and PHP4.3.4. I've used both MySQLCC and MySQLAdmin to create users with the necessary permissions to connect to the databases. I even tried the command line using GRANT ALL PRIVILEGES ON dbname.* TO dbuser@dbhost IDENTIFIED BY 'dbpass' WITH GRANT OPTION; But it didn't work. Instead it returned an error informing me that I had an error in my sql syntax. The users are able to connect without problem. Hoping someone here will have an idea on what it is I'm doing wrong. Thanks
Re: Create database error
Colin O'Connor wrote: Hi, I'm bundling MySQL with a Java app, and it is currently working on Windows and Mac OS X. Right now I'm porting it to Solaris. The problem I'm having is when I try to create a database (CREATE DATABASE mydb) I get the error: ERROR 1006: Can't create database 'mydb'. (errno: 2) Using perror, errno: 2 means No such file or directory. Does anyone know why it might be giving me that error? Possibly some symlink problem or a file system error of some kind. Try cd datadir mkdir mydb If the above works, create database should also. -- Sasha Pachev Create online surveys at http://www.surveyz.com/ -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Create database error
Might sound like a silly question, but have you checked the write permissions to the data dir? Am not sure if it is the mysql daemon that needs write access or if it is the user logged on Colin O'Connor [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi, I'm bundling MySQL with a Java app, and it is currently working on Windows and Mac OS X. Right now I'm porting it to Solaris. The problem I'm having is when I try to create a database (CREATE DATABASE mydb) I get the error: ERROR 1006: Can't create database 'mydb'. (errno: 2) Using perror, errno: 2 means No such file or directory. Does anyone know why it might be giving me that error? Thanks, Colin -- 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]
Create database error
Hi, I'm bundling MySQL with a Java app, and it is currently working on Windows and Mac OS X. Right now I'm porting it to Solaris. The problem I'm having is when I try to create a database (CREATE DATABASE mydb) I get the error: ERROR 1006: Can't create database 'mydb'. (errno: 2) Using perror, errno: 2 means No such file or directory. Does anyone know why it might be giving me that error? Thanks, Colin -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Isert arecord to database error
Hi I am trying to insert a record to SQLServer database and gettign the following error: Microsoft OLE DB Provider for SQL Server error '80040e14' The name 'Mr' is not permitted in this context. Only constants, expressions, or variables allowed here. Column names are not permitted Any idea ? - 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: newbie: creating database error
Admin-Stress, Tuesday, November 05, 2002, 12:41:08 AM, you wrote: AS After playing around with 'test' database, then I would like to create my own database. AS I logged in into mysql using root account and created a database. AS But, when I logged in using regular user, I got his error : AS ERROR 1044: Access denied for user: '@localhost' to database 'card' AS What necessary to do to create database? AS I tried to create a database using regular user, still got same error. AS I did change create_priv='Y' in user table from mysql database for this regular user. AS Anyone know how the basic steps to create database? or any documentation/website resource would be AS appreciated. Have you executed FLUSH PRIVILEGES after editing grant tables? GRANT command is easy in use to grant rights for users: http://www.mysql.com/doc/en/GRANT.html -- 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
newbie: creating database error
After playing around with 'test' database, then I would like to create my own database. I logged in into mysql using root account and created a database. But, when I logged in using regular user, I got his error : ERROR 1044: Access denied for user: '@localhost' to database 'card' What necessary to do to create database? I tried to create a database using regular user, still got same error. I did change create_priv='Y' in user table from mysql database for this regular user. Anyone know how the basic steps to create database? or any documentation/website resource would be appreciated. Thanks. kapot __ Do you Yahoo!? HotJobs - Search new jobs daily now http://hotjobs.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: newbie: creating database error
try www.mysql.com, i heard they have docs there you can read...:) -Original Message- From: Admin-Stress [mailto:meerkapot;yahoo.com] Sent: Monday, November 04, 2002 1:41 PM To: [EMAIL PROTECTED] Subject: newbie: creating database error After playing around with 'test' database, then I would like to create my own database. I logged in into mysql using root account and created a database. But, when I logged in using regular user, I got his error : ERROR 1044: Access denied for user: '@localhost' to database 'card' What necessary to do to create database? I tried to create a database using regular user, still got same error. I did change create_priv='Y' in user table from mysql database for this regular user. Anyone know how the basic steps to create database? or any documentation/website resource would be appreciated. Thanks. kapot __ Do you Yahoo!? HotJobs - Search new jobs daily now http://hotjobs.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 - 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: newbie: creating database error
Try using shellmysqladmin -u root -p -h hostname databasetobecreated password: ~Kelly W. Black -Original Message- From: Admin-Stress [mailto:meerkapot;yahoo.com] Sent: Monday, November 04, 2002 2:41 PM To: [EMAIL PROTECTED] Subject: newbie: creating database error After playing around with 'test' database, then I would like to create my own database. I logged in into mysql using root account and created a database. But, when I logged in using regular user, I got his error : ERROR 1044: Access denied for user: '@localhost' to database 'card' What necessary to do to create database? I tried to create a database using regular user, still got same error. I did change create_priv='Y' in user table from mysql database for this regular user. Anyone know how the basic steps to create database? or any documentation/website resource would be appreciated. Thanks. kapot __ Do you Yahoo!? HotJobs - Search new jobs daily now http://hotjobs.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 - 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
Access a M$ Access 2000 db with MySql-front - could not open database error
Hi all im aware this might not be the correct forum but i believe it's the same beast and it should be ansewered quite easily . I have been creating a M$ Access Front-end database with a MySql Back-end that im about to upload onto a ISP that supports Mysql/Php thus i have just downloaded MySql-Front . My problem is how does one connect to a previously created and complete M$ Access 2000 Database as i have a fullt functional Access thatis in my C:\My Documents So i have tried various notations in accessing ie Database (S); SEPARTED BY SEMICOLON (;) C:\My Documents\sps mini utility.mdb; 1st attempt error as below # Could not open database 'C:\My Documents\sps mini utility.mdb' - will be ignored. C;My Documents;sps mini utility.mdb; 2nd attempt error as below # Could not open database '# Could not open database 'C' - will be ignored. # Could not open database 'My Documents' - will be ignored. # Could not open database 'sps mini utility.mdb' - will be ignored. Any pointers welcomed Cheers -- Regards Chuck Amadi ICT Dept Systems Programmer Rhaglenydd Systemau Adran ICT - 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: Access a M$ Access 2000 db with MySql-front - could not open database error
I'm not very sure of myself ... but maybe you'd try to use quotes around the file path? -- Alle door mij verzonden email is careware. Dit houdt in dat het alleen herlezen en bewaard mag worden als je goed omgaat met al het leven op aarde en daar buiten. Als je het hier niet mee eens bent dien je mijn mailtje binnen 24 uur terug te sturen, met opgaaf van reden van onenigheid. All email sent by me is careware. This means that it can only be reread and kept if you are good for all the life here on earth and beyond. If you don't agree to these terms, you should return this email in no more than 24 hours stating the reason of disagreement. -Oorspronkelijk bericht- Van: Chuck Amadi [mailto:[EMAIL PROTECTED]] Verzonden: dinsdag 9 juli 2002 10:38 Aan: [EMAIL PROTECTED] Onderwerp: Access a M$ Access 2000 db with MySql-front - could not open database error Hi all im aware this might not be the correct forum but i believe it's the same beast and it should be ansewered quite easily . I have been creating a M$ Access Front-end database with a MySql Back-end that im about to upload onto a ISP that supports Mysql/Php thus i have just downloaded MySql-Front . My problem is how does one connect to a previously created and complete M$ Access 2000 Database as i have a fullt functional Access thatis in my C:\My Documents So i have tried various notations in accessing ie Database (S); SEPARTED BY SEMICOLON (;) C:\My Documents\sps mini utility.mdb; 1st attempt error as below # Could not open database 'C:\My Documents\sps mini utility.mdb' - will be ignored. C;My Documents;sps mini utility.mdb; 2nd attempt error as below # Could not open database '# Could not open database 'C' - will be ignored. # Could not open database 'My Documents' - will be ignored. # Could not open database 'sps mini utility.mdb' - will be ignored. Any pointers welcomed Cheers -- Regards Chuck Amadi ICT Dept Systems Programmer Rhaglenydd Systemau Adran ICT - 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
Re: Database Error
Uhm, get a bigger HD stop and move all DB/Files to that and edit your my.cnf file and restart? :) - Original Message - From: [EFR]The HEAD [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, June 11, 2002 5:38 PM Subject: Database Error Hi, the harddisk of the mysql server ran out of space. As it did so somebody tried to write into some tables via the forum. Now there are three tables marked as still in use. Everything we tried did not work - they are definitely not in use any more. Even the debug mode we could do nothing to fix it. Is there a way to cut off the data in the end of the tables? Or a program we can use to get some of the data out of it? If anybody got another suggestion how to fix this problem just tell straight away :) c'Ya Timo - 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
FW: BSD: Random unknown database error
Update: After finding a reference to problems with BSDI and the realpath() system call in the mailing list archives, I tried rebuilding MySQL with the HAVE_BROKEN_REALPATH flag defined. That seemed to clear up the problem, at least with the testing that I performed. YMMV. DSC _ Dan S. Camper Borrowed Time, Inc. Software Thaumaturge http://www.bti.net -- Forwarded Message From: Dan S. Camper [EMAIL PROTECTED] Date: Thu, 18 Apr 2002 12:41:31 -0500 To: MySQL [EMAIL PROTECTED] Subject: BSD: Random unknown database error All: Recently I've run into a problem where I intermittently receive an Unknown database error while attempting to communicate with a local MySQL server. I read through the mail list archives and discovered that others reported similar problems under BSD, but I didn't see any concrete solutions. I may not be able to provide a solution, but I believe I can pinpoint the cause. Let me apologize now for the length of this message. I'm trying to explain enough so that someone else, more knowledgable about MySQL's internals, can either use it to solve the problem or refute my guess. First, my environment: MacOS X (10.1.4), MySQL 3.23.49, running on a G3 PowerBook (Firewire), latest dev tools from Apple. The MySQL server is running on that system as well as my own C++ code. Before seeing the problem within MySQL I found a problem with my own multithreaded code. Each thread is responsible for loading a file in one directory and then manipulating a couple of other files in a different directory, all referenced relatively to the application's directory. When the load got high -- there were many concurrent threads -- I would intermittently receive an error from the OS telling me that one of the files I was trying to open could not be found. Given that the file in question was one that was supposed to always be present, I grew suspicious. After a bit of debugging, imagine my surprise when I discovered that the full pathname the OS was trying to use was wrong. Example Source file:foo/text.txt Dest file: data/index.txt App directory: /Users/lordgrey/Projects/myproject/ When the problem occurred while opening the dest file, referenced relatively, the OS was actually trying to open: /Users/lordgrey/Projects/myproject/foo/data/index.txt instead of /Users/lordgrey/Projects/myproject/data/index.txt Once I nailed down a variable with the current working directory at application launch time and used that to fully qualify my datafiles, all of my problems disappeared. As further testing, I started cranking up the number of threads. Now, in addition to dinking around with files, each thread has its own MySQL connection. Increasing the number of threads started causing the unknown database error to appear, pretty much in direct proportion to the number threads. The other problem reports in the archive noted that the unknown database problem seemed to occur when the system's load was high. That would agree with what I found. Anyway, it occurs to me that MySQL is failing to find a database -- which is a directory -- for the same reason that my code couldn't find its own data files. Namely: MySQL is using a relative path, BSD is mucking around with the concept of current working directory incorrectly and it's colliding with other concurrent threads also trying to use relative paths. I haven't picked the MySQL source code apart to see if this is really the case or not, but it seems reasonable. If it's true then the actual problem lies in BSD/MacOS/etc. but it can be worked around in the MySQL server. Cheers, DSC -- End of Forwarded Message - 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
BSD: Random unknown database error
All: Recently I've run into a problem where I intermittently receive an Unknown database error while attempting to communicate with a local MySQL server. I read through the mail list archives and discovered that others reported similar problems under BSD, but I didn't see any concrete solutions. I may not be able to provide a solution, but I believe I can pinpoint the cause. Let me apologize now for the length of this message. I'm trying to explain enough so that someone else, more knowledgable about MySQL's internals, can either use it to solve the problem or refute my guess. First, my environment: MacOS X (10.1.4), MySQL 3.23.49, running on a G3 PowerBook (Firewire), latest dev tools from Apple. The MySQL server is running on that system as well as my own C++ code. Before seeing the problem within MySQL I found a problem with my own multithreaded code. Each thread is responsible for loading a file in one directory and then manipulating a couple of other files in a different directory, all referenced relatively to the application's directory. When the load got high -- there were many concurrent threads -- I would intermittently receive an error from the OS telling me that one of the files I was trying to open could not be found. Given that the file in question was one that was supposed to always be present, I grew suspicious. After a bit of debugging, imagine my surprise when I discovered that the full pathname the OS was trying to use was wrong. Example Source file:foo/text.txt Dest file: data/index.txt App directory: /Users/lordgrey/Projects/myproject/ When the problem occurred while opening the dest file, referenced relatively, the OS was actually trying to open: /Users/lordgrey/Projects/myproject/foo/data/index.txt instead of /Users/lordgrey/Projects/myproject/data/index.txt Once I nailed down a variable with the current working directory at application launch time and used that to fully qualify my datafiles, all of my problems disappeared. As further testing, I started cranking up the number of threads. Now, in addition to dinking around with files, each thread has its own MySQL connection. Increasing the number of threads started causing the unknown database error to appear, pretty much in direct proportion to the number threads. The other problem reports in the archive noted that the unknown database problem seemed to occur when the system's load was high. That would agree with what I found. Anyway, it occurs to me that MySQL is failing to find a database -- which is a directory -- for the same reason that my code couldn't find its own data files. Namely: MySQL is using a relative path, BSD is mucking around with the concept of current working directory incorrectly and it's colliding with other concurrent threads also trying to use relative paths. I haven't picked the MySQL source code apart to see if this is really the case or not, but it seems reasonable. If it's true then the actual problem lies in BSD/MacOS/etc. but it can be worked around in the MySQL server. Cheers, DSC _ Dan S. Camper Borrowed Time, Inc. Software Thaumaturge http://www.bti.net - 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
Database Error
Good Day: Could someone help me and tell me which direction to go to see why I'm getting unknown database error caught by the SQLException catch. I checked to make sure that the Class.forName was being executed and it was. Just need a little helping hand. Thanks... Greg __ Do You Yahoo!? Yahoo! Auctions - buy the things you want at great prices http://auctions.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
Create Database error
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 With a bad syntax, i create a database named : Ysa2E3iUbr mysql create it, but i can't drop it...? there's a bug? How can i do to drop it? Thank's.. Davy Azevedo La Vie est l'art d'apprendre à mourir dignement La Naissance est son Apothéose. -BEGIN PGP SIGNATURE- Version: PGPfreeware 7.0.3 for non-commercial use http://www.pgp.com iQA/AwUBOvaOIbRtBMpEaPXcEQJ3PQCgpt7gsjc7ncCkiIhO027cB/+nz4cAoMXZ YKP9M1yRZX0XSj8fkY/lr35m =BL8/ -END PGP SIGNATURE-
Re: error can't create database (error 13)
At 20:45 26/04/01 -0700, Brent and Maria wrote: Hi, I guess that your problem is the permission of the user that you made the login. Take a look to permission properties in the \mysql\data directory. Regards, Miguel Hello List, I have recently installed mysql 3.23.33 on my windows 2000 machine. I don't see anything in the documentation that I need to do to my machine for setup (after the installation). I can run mysql fine, but it seems to be only able to read. I want to create a new database. I try to do this in mysql and using mysqladmin create dbName. I get the error: mysqladmin: Create failed; error: 'Can't create database 'dbName'. (errno: 13)' Has anyone run into this? I am making a beginner mistake? I would appreciate any one to point me in the right direction. Thanks, Brent - 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 __ ___ __ / |/ /_ __/ __/ __ \/ / http://www.mysql.com/ / /|_/ / // /\ \/ /_/ / /__ Miguel Solórzano [EMAIL PROTECTED] /_/ /_/\_, /___/\___\_\___/ São Paulo, Brazil ___/ Development Team - 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
error can't create database (error 13)
Hello List, I have recently installed mysql 3.23.33 on my windows 2000 machine. I don't see anything in the documentation that I need to do to my machine for setup (after the installation). I can run mysql fine, but it seems to be only able to read. I want to create a new database. I try to do this in mysql and using mysqladmin create dbName. I get the error: mysqladmin: Create failed; error: 'Can't create database 'dbName'. (errno: 13)' Has anyone run into this? I am making a beginner mistake? I would appreciate any one to point me in the right direction. Thanks, Brent - 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: Unknown Database, Error 1049 problems...
Jason Guritz wrote: mysql show databases; +---+ | Database | +---+ | directory | | mysql | | phpBB | | testdb | | trial | +---+ 5 rows in set (0.00 sec) mysql use testdb; ERROR 1049: Unknown database 'testdb' Keeps happening to me too. It was working the day before :( Jason Were you moving directories around? Looks like testdb has some spaces or other unprintable characters in its directory name. - 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: Unknown Database, Error 1049 problems...
I know you people are busy but I have seen this question a few times on the lists to no avail. *see below* It has been figured out by my admin. It appears that one or more entries in the ACL tables is corrupt, when this happens so its preventing logins. So you have to replace the ACL with a fresh copy and then replace all the domain and passwords. I am not pretending in any way to know what I am talking about compared to anyone else. You are the experts but I thought you might want to know for the future. When the exact problem pops up again. Kindest regards, Jason mysql show databases; +---+ | Database | +---+ | directory | | mysql | | phpBB | | testdb| | testdb2 | +---+ 5 rows in set (0.00 sec) mysql use testdb2; ERROR 1049: Unknown database 'testdb2' Thats the error message that can be fixed by replacing the ACL. This is of course when there is no trailing white space or anything else wrong. - 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