473,395 Members | 1,678 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

MySQL setup, Another twist - To mysqldump restoration ?


I have a dedicated server running 'FreeBSD 4.9 STABLE' at a hosting
site. They have done some default installations, presumably from the CVS
ports package ??. Herein lies the problem, "I do not know" what they
have done!

At first it was apparent that MySQL was installed
mysql_install_db ; GRANT TABLES etc. ???

so I ran "mysql_install_db --force"

Interestingly a 'my.cnf' file was not found on system so I installed one
from a prior installation to /etc/my.cnf

Now, server seems to launch on reboot

From ps waux: ==>
root 317 0.0 0.1 648 468 con- I 4:35AM 0:00.01
/bin/sh /usr/local/bin/mysqld_safe --user=mysql --datadir=/var/db/
mysql 444 0.0 4.0 51984 20612 ?? S 4:35AM 0:07.57
/usr/local/libexec/mysqld --basedir=/usr/local --datadir=/var/db/m
<== Server seems to be running
Attempting to enter DB ==>

mysql -h localhost -u root
ERROR 1045: Access denied for user: 'root@localhost' (Using password: NO)

mach-1# mysql -h localhost -u root -p********
ERROR 1045: Access denied for user: 'root@localhost' (Using password: YES)

mach-1#
mach-1#

mach-1# mysql -h localhost -u mysql
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 32 to server version: 4.0.16

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> SHOW DATABASES;
+----------+
| Database |
+----------+
| test |
+----------+
1 row in set (0.00 sec)

mysql> USE test
Database changed
mysql> SHOW TABLES;
ERROR 12: Can't read dir of './test/' (Errcode: 13)
mysql>
mysql> CREATE DATABASE IF NOT EXISTS nu_tests;
ERROR 1044: Access denied for user: '@localhost' to database 'nu_tests'
<==

So I can't get in as user root, and the privileged user mysql is
impotent to do anything

==>
perror 1044 13
Error code 1044: Unknown error: 1044
Error code 13: Permission denied

ls -l /var/db/mysql/test
total 4
drwx------ 2 root mysql 512 Jul 4 02:27 ./
drwx------ 5 mysql mysql 512 Jul 4 14:33 ../
<==
MT test directory ...? is this supposed to be this way initially and
isn't test supposed to be accessible by all users
<==

OK so let me assume mysql is the privileged user
then

==>
GRANT ALL PRIVILEGES ON *.* TO adamson@localhost
-> IDENTIFIED BY abcdefgh GRANT OPTION;
ERROR 1064: You have an error in your SQL syntax. Check the manual that
corresponds to your MySQL server version for the right syntax to use
near 'abcdefgh WITH GRANT OPTION' at line 2
mysql>
mysql> GRANT ALL PRIVILEGES ON *.* TO adamson@localhost
-> IDENTIFIED BY 'abcdefgh' WITH GRANT OPTION;
ERROR 1045: Access denied for user: '@localhost' (Using password: NO)
mysql>

perror 1064 1045
Error code 1064: Unknown error: 1064
Error code 1045: Unknown error: 1045
<==
Please advise!

Thanks
-- Adam --

Jul 20 '05 #1
4 5803
roy
try 127.0.0.1 instead of localhost and see what happens?
"Adam Smith" <ad*******@econ.com> wrote in message
news:AP********************@speakeasy.net...

I have a dedicated server running 'FreeBSD 4.9 STABLE' at a hosting
site. They have done some default installations, presumably from the CVS
ports package ??. Herein lies the problem, "I do not know" what they
have done!

At first it was apparent that MySQL was installed
mysql_install_db ; GRANT TABLES etc. ???

so I ran "mysql_install_db --force"

Interestingly a 'my.cnf' file was not found on system so I installed one
from a prior installation to /etc/my.cnf

Now, server seems to launch on reboot

From ps waux: ==>
root 317 0.0 0.1 648 468 con- I 4:35AM 0:00.01
/bin/sh /usr/local/bin/mysqld_safe --user=mysql --datadir=/var/db/
mysql 444 0.0 4.0 51984 20612 ?? S 4:35AM 0:07.57
/usr/local/libexec/mysqld --basedir=/usr/local --datadir=/var/db/m
<== Server seems to be running
Attempting to enter DB ==>

mysql -h localhost -u root
ERROR 1045: Access denied for user: 'root@localhost' (Using password: NO)

mach-1# mysql -h localhost -u root -p********
ERROR 1045: Access denied for user: 'root@localhost' (Using password: YES)

mach-1#
mach-1#

mach-1# mysql -h localhost -u mysql
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 32 to server version: 4.0.16

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> SHOW DATABASES;
+----------+
| Database |
+----------+
| test |
+----------+
1 row in set (0.00 sec)

mysql> USE test
Database changed
mysql> SHOW TABLES;
ERROR 12: Can't read dir of './test/' (Errcode: 13)
mysql>
mysql> CREATE DATABASE IF NOT EXISTS nu_tests;
ERROR 1044: Access denied for user: '@localhost' to database 'nu_tests'
<==

So I can't get in as user root, and the privileged user mysql is
impotent to do anything

==>
perror 1044 13
Error code 1044: Unknown error: 1044
Error code 13: Permission denied

ls -l /var/db/mysql/test
total 4
drwx------ 2 root mysql 512 Jul 4 02:27 ./
drwx------ 5 mysql mysql 512 Jul 4 14:33 ../
<==
MT test directory ...? is this supposed to be this way initially and
isn't test supposed to be accessible by all users
<==

OK so let me assume mysql is the privileged user
then

==>
GRANT ALL PRIVILEGES ON *.* TO adamson@localhost
-> IDENTIFIED BY abcdefgh GRANT OPTION;
ERROR 1064: You have an error in your SQL syntax. Check the manual that
corresponds to your MySQL server version for the right syntax to use
near 'abcdefgh WITH GRANT OPTION' at line 2
mysql>
mysql> GRANT ALL PRIVILEGES ON *.* TO adamson@localhost
-> IDENTIFIED BY 'abcdefgh' WITH GRANT OPTION;
ERROR 1045: Access denied for user: '@localhost' (Using password: NO)
mysql>

perror 1064 1045
Error code 1064: Unknown error: 1064
Error code 1045: Unknown error: 1045
<==
Please advise!

Thanks
-- Adam --

Jul 20 '05 #2
Adam Smith wrote:
ls -l /var/db/mysql/test
total 4
drwx------ 2 root mysql 512 Jul 4 02:27 ./


My test directory is mode 750, user mysql, group mysql.
In any case, the uid that the mysqld process runs under should have full
access to the database directories, shouldn't it?

Also, review the procedure for post-installation of MySQL on UNIX:
http://dev.mysql.com/doc/mysql/en/mysql_install_db.html

Regards,
Bill K.
Jul 20 '05 #3
i must admit my knowledge with console commands is not good, as i use
the windows version which gets a gui to do these things (very lame sorry
:).

Noticed that although you tried to login as mysql, it still thinks
you're not logged in (or logged in as a blank user). How about
replacing all the tables in the "mysql" database, so at least you could
login as root again. Or better still, remove the default installation
altogether.

Adam Smith wrote:

I have a dedicated server running 'FreeBSD 4.9 STABLE' at a hosting
site. They have done some default installations, presumably from the CVS
ports package ??. Herein lies the problem, "I do not know" what they
have done!

At first it was apparent that MySQL was installed
mysql_install_db ; GRANT TABLES etc. ???

so I ran "mysql_install_db --force"

Interestingly a 'my.cnf' file was not found on system so I installed one
from a prior installation to /etc/my.cnf

Now, server seems to launch on reboot

From ps waux: ==>
root 317 0.0 0.1 648 468 con- I 4:35AM 0:00.01
/bin/sh /usr/local/bin/mysqld_safe --user=mysql --datadir=/var/db/
mysql 444 0.0 4.0 51984 20612 ?? S 4:35AM 0:07.57
/usr/local/libexec/mysqld --basedir=/usr/local --datadir=/var/db/m
<== Server seems to be running
Attempting to enter DB ==>

mysql -h localhost -u root
ERROR 1045: Access denied for user: 'root@localhost' (Using password: NO)

mach-1# mysql -h localhost -u root -p********
ERROR 1045: Access denied for user: 'root@localhost' (Using password: YES)

mach-1#
mach-1#

mach-1# mysql -h localhost -u mysql
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 32 to server version: 4.0.16

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> SHOW DATABASES;
+----------+
| Database |
+----------+
| test |
+----------+
1 row in set (0.00 sec)

mysql> USE test
Database changed
mysql> SHOW TABLES;
ERROR 12: Can't read dir of './test/' (Errcode: 13)
mysql>
mysql> CREATE DATABASE IF NOT EXISTS nu_tests;
ERROR 1044: Access denied for user: '@localhost' to database 'nu_tests'
<==

So I can't get in as user root, and the privileged user mysql is
impotent to do anything

==>
perror 1044 13
Error code 1044: Unknown error: 1044
Error code 13: Permission denied

ls -l /var/db/mysql/test
total 4
drwx------ 2 root mysql 512 Jul 4 02:27 ./
drwx------ 5 mysql mysql 512 Jul 4 14:33 ../
<==
MT test directory ...? is this supposed to be this way initially and
isn't test supposed to be accessible by all users
<==

OK so let me assume mysql is the privileged user
then

==>
GRANT ALL PRIVILEGES ON *.* TO adamson@localhost
-> IDENTIFIED BY abcdefgh GRANT OPTION;
ERROR 1064: You have an error in your SQL syntax. Check the manual that
corresponds to your MySQL server version for the right syntax to use
near 'abcdefgh WITH GRANT OPTION' at line 2
mysql>
mysql> GRANT ALL PRIVILEGES ON *.* TO adamson@localhost
-> IDENTIFIED BY 'abcdefgh' WITH GRANT OPTION;
ERROR 1045: Access denied for user: '@localhost' (Using password: NO)
mysql>

perror 1064 1045
Error code 1064: Unknown error: 1064
Error code 1045: Unknown error: 1045
<==
Please advise!

Thanks
-- Adam --

Jul 20 '05 #4
(probably a long shot) i once used a hosting company which used mysql on
linux, and was given myphpadmin as the interface to it. Any chance a
similar setup could be happening before you acquired it, and if so
whether any scripts might still be there to give more clues...

David L wrote:
i must admit my knowledge with console commands is not good, as i use
the windows version which gets a gui to do these things (very lame sorry
:).

Noticed that although you tried to login as mysql, it still thinks
you're not logged in (or logged in as a blank user). How about
replacing all the tables in the "mysql" database, so at least you could
login as root again. Or better still, remove the default installation
altogether.

Adam Smith wrote:

I have a dedicated server running 'FreeBSD 4.9 STABLE' at a hosting
site. They have done some default installations, presumably from the
CVS ports package ??. Herein lies the problem, "I do not know" what
they have done!

At first it was apparent that MySQL was installed
mysql_install_db ; GRANT TABLES etc. ???

so I ran "mysql_install_db --force"

Interestingly a 'my.cnf' file was not found on system so I installed
one from a prior installation to /etc/my.cnf

Now, server seems to launch on reboot

From ps waux: ==>
root 317 0.0 0.1 648 468 con- I 4:35AM 0:00.01
/bin/sh /usr/local/bin/mysqld_safe --user=mysql --datadir=/var/db/
mysql 444 0.0 4.0 51984 20612 ?? S 4:35AM 0:07.57
/usr/local/libexec/mysqld --basedir=/usr/local --datadir=/var/db/m
<== Server seems to be running
Attempting to enter DB ==>

mysql -h localhost -u root
ERROR 1045: Access denied for user: 'root@localhost' (Using password: NO)

mach-1# mysql -h localhost -u root -p********
ERROR 1045: Access denied for user: 'root@localhost' (Using password:
YES)

mach-1#
mach-1#

mach-1# mysql -h localhost -u mysql
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 32 to server version: 4.0.16

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> SHOW DATABASES;
+----------+
| Database |
+----------+
| test |
+----------+
1 row in set (0.00 sec)

mysql> USE test
Database changed
mysql> SHOW TABLES;
ERROR 12: Can't read dir of './test/' (Errcode: 13)
mysql>
mysql> CREATE DATABASE IF NOT EXISTS nu_tests;
ERROR 1044: Access denied for user: '@localhost' to database 'nu_tests'
<==

So I can't get in as user root, and the privileged user mysql is
impotent to do anything

==>
perror 1044 13
Error code 1044: Unknown error: 1044
Error code 13: Permission denied

ls -l /var/db/mysql/test
total 4
drwx------ 2 root mysql 512 Jul 4 02:27 ./
drwx------ 5 mysql mysql 512 Jul 4 14:33 ../
<==
MT test directory ...? is this supposed to be this way initially and
isn't test supposed to be accessible by all users
<==

OK so let me assume mysql is the privileged user
then

==>
GRANT ALL PRIVILEGES ON *.* TO adamson@localhost
-> IDENTIFIED BY abcdefgh GRANT OPTION;
ERROR 1064: You have an error in your SQL syntax. Check the manual
that corresponds to your MySQL server version for the right syntax to
use near 'abcdefgh WITH GRANT OPTION' at line 2
mysql>
mysql> GRANT ALL PRIVILEGES ON *.* TO adamson@localhost
-> IDENTIFIED BY 'abcdefgh' WITH GRANT OPTION;
ERROR 1045: Access denied for user: '@localhost' (Using password: NO)
mysql>

perror 1064 1045
Error code 1064: Unknown error: 1064
Error code 1045: Unknown error: 1045
<==
Please advise!

Thanks
-- Adam --

Jul 20 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: James | last post by:
HI, I'm looking for a script that will allow users/admins to have a one click backup solution for a MYSQL Database.. 'BACK DATABASE' button, click and its done... The a restore option, that...
4
by: Dave Moore | last post by:
Hi All, I'm looking at using PHP and MySQL for a particular website application. However, I was a bit concerned that if a PHP script went wrong then it would be possible to accidentally delete or...
0
by: xabaras | last post by:
Doubt. Backup of the database. Example: CREATE DATABASE prova; CREATE TABLE `test` (`progressivo` tinyint(3) unsigned NOT NULL auto_increment,`testo` char(50), PRIMARY KEY (`progressivo`))...
1
by: Dave Crypto | last post by:
Hi there, SUMMARY: 1) When I use phpadmin to export a large database, the file created on my local PC never containes all the tables and information. It seems to max out at about 10mb. 2)...
4
by: news | last post by:
Our production database in an exported textfil runs about 60 MB. Compressed that's about 9 MB. I'm trying to import the export into another machine running FC3 and mySQL 11.18, and it appears as...
3
by: Thiagu.M | last post by:
Hi All i dont have much experience in databases or Mysql.i have my data in development m/c with Mysql 4.1.12, i have to move them to production m/c with Mysql 5.0.3 .when tried it showed error...
5
by: linuxlover992000 | last post by:
I am a newbie in the world of MySQL. In fact I enabled it in my Linux box only because it is required to run WordPress (the blogging software). I was trying to plan ahead and figure out a way to...
7
by: Randy | last post by:
Folks: We have a web-based app that's _really_ slowing down because multiple clients are writing their own private data into a single, central database. I guess the previous programmer did...
15
by: Jerry Yang | last post by:
Hi I'm having issues with mysqldump so need to create backups of my mysql databases using PHP. Can any one recommend a way to do this with out calling mysqldump ? I did find one script and it...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.