LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-04-2005, 05:32 AM   #1
dt4stat
LQ Newbie
 
Registered: Mar 2005
Posts: 19

Rep: Reputation: 0
Access old data with newly installed MySQL


Hi all:
I am stuck on this for days , please help me if you can. All suggestions are wellcomed.

I have a RHEL 3.0 server running. Mysql 3.X was installed, and i removed that and its related packages (to get rid of the installation conflict).

Before i install 4.x rpm , runing "rpm -q -a | grep -i mysql " returned nothing. After runing these two commands below, i didnt do anything, and when i logged in again, i can get a promt by typing mysql at the shell.

rpm -i MySQL-client-4.1.11-0.i386.rpm
rpm -i MySQL-server-4.1.11-0.i386.rpm

My old data is in /var/lib/mysql/old_data, and the data created by the newly installed mysql 4.x is in the same directory: /var/lib/mysql/test
I tried create table in database test, it works, and i can see those file in the /var/lib/mysql/test/ folder.

At the mysql promt

mysql> use olddata;
ERROR 1044 (42000): Access denied for user ''@'localhost' to 'database olddata'

mysql> use test;
====> OK for creating table


I tried the above command as user 'mysql', and 'normal user'
As a root, i couldnt get the mysql promt.


So I want to access those old data again, any sugguestions ?

Many Thanks (Sorry for duplicatoin)


--DT
 
Old 05-04-2005, 06:00 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Quote:
My old data is in /var/lib/mysql/old_data
Try:
mysql> use old_data;
Also check if your old_data database has the correct rights.
 
Old 05-05-2005, 01:12 PM   #3
dt4stat
LQ Newbie
 
Registered: Mar 2005
Posts: 19

Original Poster
Rep: Reputation: 0
hi bathory:
Thanks for replying.

I changed the rights of old_data folder, so its right is identical to "test". However, i still can not access the old_data at the mysql promt:

mysql> use old_data;
ERROR 1044 (42000): Access denied for user ''@'localhost' to database 'old_data'

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



How can i make old_data one the the database the i can use ?




--DT
 
Old 05-06-2005, 02:11 AM   #4
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
You don't have the "mysql" database, which is used to store users, passwords, rights etc.
I don't know if the installation using RPMs should have created it, but since it does not exist you must create it prior running mysqld for the first time. In the source and binary distributions there is a script named "mysql_install_db" which creates the initial mysql database. Search for it in your installation location and run it.
Another thing you have to take care is that perhaps old_data uses isam tables while mysql 4.x uses myisam. If that's the case you must run another script named "mysql_convert_table_format" to convert isam to myisam. Take a look here for more details about upgrading from 3.x to 4.x.

Regards
 
Old 12-05-2005, 01:48 AM   #5
shukla_chanchal
Member
 
Registered: Oct 2005
Location: banglore(india)
Posts: 62

Rep: Reputation: 15
how to read mysql

can anyone tell me from where i can read mysql in linux


and i also need to know how to know about errors

is there any directory or sth which tells which error means what
 
Old 12-05-2005, 01:51 AM   #6
shukla_chanchal
Member
 
Registered: Oct 2005
Location: banglore(india)
Posts: 62

Rep: Reputation: 15
whenever i am writing create database helo;

it gives error

ERROR 1044 (42000): Access denied for user ''@'localhost' to database 'helo'

please tell me why this is happening

and how to use mysql i have istalled it
when i am givien command
show databases;
it shows but others not working
tell me please
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Newly Installed Apps anon209 Linux - Newbie 2 11-25-2005 09:41 PM
How to configure newly installed Macintosh access to Linux shared drives mrmandms Linux - Networking 4 09-08-2005 05:04 PM
Access old data with newly installed MySQL dt4stat Linux - Enterprise 3 05-06-2005 06:11 PM
MySQL Access problem from Aqua Data Studio stedo Linux - Software 0 10-03-2003 02:57 AM
newly installed programs... tang Linux - Software 2 09-10-2003 08:41 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:25 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration