Mysql table creation problems!!
hi I tried to create a table in my sql by executing the following query.
CREATE TABLE product ( prodID INT UNSIGNED AUTO_INCREMENT, description VARCHAR(100), PRIMARY KEY(prodID) ); But it is not working, The error is ERROR 3: Error writing file './test/product.frm' (Errcode: 28) Help Me I am Very New to Mysql Thanks....... :Pengy: :Pengy: :Pengy: :Pengy: :Pengy: :Pengy: :Pengy: |
Check the permissions on the mysql data directory - does the user that mysql is running as have write access to it?
|
I am able to delete existing tables.It means that i have the writing permissions??:(
|
No, it's not the same. You need to check the permissions, I think. I don't know how you have your MySQL installed, but look into /var/lib/mysql, it may be the right directory.
|
I am entering from the root account,and i used mysql -h sr2 -u root tes for entering into mysql, and i dont have a password,is there any wrong with that??
Thanks for ur valuable reply |
I also set the /var/lib/mysql and its contents to 777 .,yet it is not working
|
Can you post the output from:
ls -la /var/lib/mysql ps -ef | grep mysql df -h |
ls -la /var/lib/mysql output is
total 16 4 drwxrwxrwx 2 mysql mysql 4096 Jun 27 19:05 mysql 4 drwxrwxrwx 2 mysql mysql 4096 Jun 27 18:26 project 4 drwxrwxrwx 2 mysql mysql 4096 Jun 27 19:19 test 4 -rwxrwxrwx 1 mysql mysql 763 Jun 27 19:22 valuestoadd ps -ef | grep mysql root 1082 1 0 19:16 tty1 00:00:00 /bin/sh /usr/bin/safe_mysqld --d mysql 1109 1082 0 19:16 tty1 00:00:00 /usr/libexec/mysqld --defaults-f df -h Filesystem Size Used Avail Use% Mounted on /dev/hda13 5.3G 5.2G 0 100% / /dev/hda3 76M 17M 55M 24% /boot /dev/hda12 7.9G 6.0G 1.6G 79% /home none 109M 0 108M 0% /dev/shm I think the problem is with space . But i can create text files on / |
It is a space issue. You can probably create files as root but not as a regular or system user like mysql. I suggest that you free ups some space on /. Perhaps you could move your databases to /home/mysql/data - that will give you more space for them and free up space on the / partition
|
Thank you sir that is the problem.Then how can i change the directory(By just moving??),
how i inform mysql that the directory is changed? Thank you :Pengy: :Pengy: :Pengy: |
The best way is to:
1) Stop mysqld 2) Move the data to it's new location - ie "/home/mysql/data" 3) Change the options when you start mysqld to use "--datadir=/home/mysql/data" 4) Start mysqld |
All times are GMT -5. The time now is 02:03 AM. |