MySql Problem Error 13

Discussion regarding the installation and configuration of Linux distributions.

MySql Problem Error 13

Postby A_Karim » Sat Jan 13, 2007 1:24 pm

I am facing problem to start MySql

[root@ks300 ~]# service mysqld start
using pid file /var/run/mysqld/mysqld.pid
using log file /var/log/mysqld.log
Starting mysqld daemon with databases from /var/lib/mysql
STOPPING server from pid file /var/run/mysqld/mysqld.pid
070113 13:16:06 mysqld ended


[Log]
070113 13:16:05 mysqld started
070113 13:16:06 InnoDB: Operating system error number 13 in a file operation.
InnoDB: The error means mysqld does not have the access rights to
InnoDB: the directory.
InnoDB: File name ./ibdata1
InnoDB: File operation call: 'open'.
InnoDB: Cannot continue operation.
070113 13:16:06 mysqld ended


[my.cnf]
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/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]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid


User mysql have access rights on all the files in /var/lib/mysql

Please give solutions to get ridoff this problem
Eyes Never Says Lies
A_Karim
Lance Naik
 
Posts: 34
Joined: Thu Jul 22, 2004 4:18 pm
WLM: engr_akarim@hotmail.com
Yahoo Messenger: engr_akarim@yahoo.com
Location: Karachi

Re: MySql Problem Error 13

Postby lambda » Sat Jan 13, 2007 2:43 pm

type "ls -la /var/lib/mysql" and paste the output here (use the code tags).
lambda
Major General
 
Posts: 3452
Joined: Tue May 27, 2003 7:04 pm
Website: http://www.hungry.com/~fn/
Location: Lahore

Re:

Postby LinuxFreaK » Mon Jan 15, 2007 12:23 pm

Dear A_Karim,
Salam,

Error 13 means "Permission denied". Use below command to resolve this issue.

# chown -R mysql.mysql /var/lib/mysql
# service mysqld start


Best Regards.
Farrukh Ahmed
LinuxFreaK
Site Admin
 
Posts: 5132
Joined: Fri May 02, 2003 10:24 am
ICQ: 82075802
Website: http://www.linuxpakistan.net/wiki/index.php?pagename=LinuxFreak
WLM: f4fahmed@hotmail.com
Yahoo Messenger: f4fahmed@yahoo.com
AOL: linuxpakistan@aol.com
Location: Karachi

MySql Problem Error 13

Postby A_Karim » Wed Jan 17, 2007 2:20 pm

thank u all to help me now its working fine

There is another issue i have taking backup through mysqldump

# mysqldump -u root -p database > backup.sql

after droping database i have create database with same name and than perform following command to restore database
# mysqldump -u root -p database < backup.sql

[Output]
-- MySQL dump 10.10
--
-- Host: localhost Database: sugaros
-- ------------------------------------------------------
-- Server version 5.0.27

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;

/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;

-- Dump completed on 2007-01-17 9:07:40


when i check my database its empty the database schema does not created

why it happened ? any solution or i did perform something wrong ?

thanks in advance

Regards
AK
Eyes Never Says Lies
A_Karim
Lance Naik
 
Posts: 34
Joined: Thu Jul 22, 2004 4:18 pm
WLM: engr_akarim@hotmail.com
Yahoo Messenger: engr_akarim@yahoo.com
Location: Karachi

Re:

Postby LinuxFreaK » Thu Jan 18, 2007 4:02 pm

Dear A_Karim,
Salam,

A_Karim wrote:/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;

/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;


Your database was empty when you taken dump. Read what /* */ will do.

Best Regards.
Farrukh Ahmed
LinuxFreaK
Site Admin
 
Posts: 5132
Joined: Fri May 02, 2003 10:24 am
ICQ: 82075802
Website: http://www.linuxpakistan.net/wiki/index.php?pagename=LinuxFreak
WLM: f4fahmed@hotmail.com
Yahoo Messenger: f4fahmed@yahoo.com
AOL: linuxpakistan@aol.com
Location: Karachi

MySql Problem Error 13

Postby A_Karim » Fri Jan 19, 2007 1:31 pm

Wsalam Farrukh Bahi
thanks to reply

I have perform all these steps :
mysql> show tables;
+--------------------------------+
| Tables_in_sugaroscrm |
+--------------------------------+
| accounts |
| accounts_audit |
| accounts_bugs |
| accounts_cases |
| accounts_contacts |

..................

mysqldump -u root -p sugaroscrm > backup-sugaroscrm.sql

[backup-sugaroscrm.sql]
-- MySQL dump 10.10
--
-- Host: localhost Database: sugaroscrm
-- ------------------------------------------------------
-- Server version 5.0.27

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;

--
-- Table structure for table `accounts`
--

DROP TABLE IF EXISTS `accounts`;
CREATE TABLE `accounts` (
`id` char(36) NOT NULL,
`date_entered` datetime NOT NULL,
`date_modified` datetime NOT NULL,
`modified_user_id` char(36) NOT NULL,
`assigned_user_id` char(36) default NULL,
`created_by` char(36) default NULL,
`name` varchar(150) default NULL,
`parent_id` char(36) default NULL,
`account_type` varchar(25) default NULL,
`industry` varchar(25) default NULL,
`annual_revenue` varchar(25) default NULL,
`phone_fax` varchar(25) default NULL,
`billing_address_street` varchar(150) default NULL,
`billing_address_city` varchar(100) default NULL,
`billing_address_state` varchar(100) default NULL,
`billing_address_postalcode` varchar(20) default NULL,
`billing_address_country` varchar(100) default NULL,
`billing_address_postalcode` varchar(20) default NULL,
`billing_address_country` varchar(100) default NULL,
`description` text,
`rating` varchar(25) default NULL,
`phone_office` varchar(25) default NULL,
`phone_alternate` varchar(25) default NULL,
`email1` varchar(100) default NULL,
`email2` varchar(100) default NULL,
`website` varchar(255) default NULL,
`ownership` varchar(100) default NULL,
`employees` varchar(10) default NULL,
`sic_code` varchar(10) default NULL,
`ticker_symbol` varchar(10) default NULL,
`shipping_address_street` varchar(150) default NULL,
`shipping_address_city` varchar(100) default NULL,
`shipping_address_state` varchar(100) default NULL,
`shipping_address_postalcode` varchar(20) default NULL,
`shipping_address_country` varchar(100) default NULL,
`deleted` tinyint(1) NOT NULL default '0',
PRIMARY KEY (`id`),
KEY `idx_accnt_id_del` (`id`,`deleted`),
KEY `idx_accnt_assigned_del` (`deleted`,`assigned_user_id`),
KEY `idx_accnt_parent_id` (`parent_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

--
-- Dumping data for table `accounts`
--

LOCK TABLES `accounts` WRITE;
/*!40000 ALTER TABLE `accounts` DISABLE KEYS */;
/*!40000 ALTER TABLE `accounts` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `accounts_audit`
--

DROP TABLE IF EXISTS `accounts_audit`;
CREATE TABLE `accounts_audit` (
`id` char(36) NOT NULL,
`parent_id` char(36) NOT NULL,
`date_created` datetime default NULL,
`created_by` varchar(36) default NULL,
`field_name` varchar(100) default NULL,
`data_type` varchar(100) default NULL,
`before_value_string` varchar(255) default NULL,
`after_value_string` varchar(255) default NULL,
`before_value_text` text,
`after_value_text` text
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

--
-- Dumping data for table `accounts_audit`

..................

mysql> drop database sugaroscrm;
Query OK, 92 rows affected (0.59 sec)

mysql> create database sugaroscrm;

[root@ks300 local]# mysqldump -u root -p sugaroscrm < backup-sugaroscrm.sql
Enter password:
-- MySQL dump 10.10
--
-- Host: localhost Database: sugaroscrm
-- ------------------------------------------------------
-- Server version 5.0.27

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;

/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;

-- Dump completed on 2007-01-19 8:22:05

thats all i have perfomed please find out the problem where i did mistake plese help out

Regards
AK
Eyes Never Says Lies
A_Karim
Lance Naik
 
Posts: 34
Joined: Thu Jul 22, 2004 4:18 pm
WLM: engr_akarim@hotmail.com
Yahoo Messenger: engr_akarim@yahoo.com
Location: Karachi

Re:

Postby LinuxFreaK » Fri Jan 19, 2007 4:05 pm

Dear A_Karim,
Salam,

A_Karim wrote:[root@ks300 local]# mysqldump -u root -p sugaroscrm < backup-sugaroscrm.sql


Wrong command you have used to restore MySQL Database. Use below command and it will work.

# mysql -u root -p sugaroscrm < backup-sugaroscrm.sql

Best Regards.
Farrukh Ahmed
LinuxFreaK
Site Admin
 
Posts: 5132
Joined: Fri May 02, 2003 10:24 am
ICQ: 82075802
Website: http://www.linuxpakistan.net/wiki/index.php?pagename=LinuxFreak
WLM: f4fahmed@hotmail.com
Yahoo Messenger: f4fahmed@yahoo.com
AOL: linuxpakistan@aol.com
Location: Karachi

MySql Problem Error 13

Postby A_Karim » Fri Jan 19, 2007 5:33 pm

Assalam-o-Aliakum

thanks Farrukh bahi yes now its restore
I have another problem i want to install mod_jk2 but when i try to ./configure it generate error cannot find apxs from where i install apxs or i reinstall httpd

Thanks in advance

Regards
AK
Eyes Never Says Lies
A_Karim
Lance Naik
 
Posts: 34
Joined: Thu Jul 22, 2004 4:18 pm
WLM: engr_akarim@hotmail.com
Yahoo Messenger: engr_akarim@yahoo.com
Location: Karachi

Postby lambda » Fri Jan 19, 2007 6:26 pm

it's part of the httpd-dev or apache-dev or whatever the package is called. your distribution has it somewhere.

maybe it's installed already, but as apxs2.
lambda
Major General
 
Posts: 3452
Joined: Tue May 27, 2003 7:04 pm
Website: http://www.hungry.com/~fn/
Location: Lahore

Re:

Postby LinuxFreaK » Mon Jan 22, 2007 9:36 am

Dear A_Karim,
Salam,

Install Apache Development Package. It will install apxs command on your system.

Best Regards.
Farrukh Ahmed
LinuxFreaK
Site Admin
 
Posts: 5132
Joined: Fri May 02, 2003 10:24 am
ICQ: 82075802
Website: http://www.linuxpakistan.net/wiki/index.php?pagename=LinuxFreak
WLM: f4fahmed@hotmail.com
Yahoo Messenger: f4fahmed@yahoo.com
AOL: linuxpakistan@aol.com
Location: Karachi

MySql Problem Error 13

Postby A_Karim » Thu Jan 25, 2007 3:46 pm

Assalam-o-Aliakum

I want to take incremetal backup of my mysql database and also wants to take database files on date bases like only backup thoses files which are created in year 2006 how could i do this ??

I have gone through these steps to generate binary logs for incremental backup but unfortunately there is no binary log created.

[my.cnf]

[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/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
log-bin=/var/lib/mysql/data/log-bin
log-bin-index=/var/lib/mysqldata/log-bin.index

[mysql.server]
user=mysql
basedir=/var/lib

[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
---------------------------------------------

1. mysqldump -u root -proot --flush-logs db>backup.sql
2. mysqladmin flush-logs
3. service mysqld restart

Can anyone tell me whats going wrong with this ? why binary logs not created

Thanks in advance

Regards
AK
Eyes Never Says Lies
A_Karim
Lance Naik
 
Posts: 34
Joined: Thu Jul 22, 2004 4:18 pm
WLM: engr_akarim@hotmail.com
Yahoo Messenger: engr_akarim@yahoo.com
Location: Karachi

Re:

Postby LinuxFreaK » Fri Jan 26, 2007 10:49 am

Farrukh Ahmed
LinuxFreaK
Site Admin
 
Posts: 5132
Joined: Fri May 02, 2003 10:24 am
ICQ: 82075802
Website: http://www.linuxpakistan.net/wiki/index.php?pagename=LinuxFreak
WLM: f4fahmed@hotmail.com
Yahoo Messenger: f4fahmed@yahoo.com
AOL: linuxpakistan@aol.com
Location: Karachi


Return to “%s” Installation

Who is online

Users browsing this forum: Yahoo [Bot] and 3 guests

cron