SQL's

pilpelet

Verified User
Joined
Oct 12, 2003
Messages
108
Hi ,

Any idea on how to restore a mysql dump directly from the server as root without any user problems(root and regular user) .

Thanks for any help .
 
Thanks ,

I used a thierd party software eventually , anyway if ill restore
the dump as root , will it make permissions erorrs for the db to work ?
 
Hello,

If you'll probalby just want to specify the database name as well (in case it's not setup in the sql file), then it will know where to put it:

mysql -u username -ppassword database < dump.sql

As long as the user was already setup in the mysql table, you don't need to worry about database permissions.

John
 
pilpelet said:
Thanks ,

I used a thierd party software eventually , anyway if ill restore
the dump as root , will it make permissions erorrs for the db to work ?

Doesnt matter who restored the database - aslong as any user has permissions to view the database (entirely seperate to the database / contents itself).

Based on John's suggestion, if you made the dump using phpmyadmin or similar its likely you wont specify the database, either use the suggestion made above or add the following to the top of the dump file:

USE database

Chris
 
Hi ,

Thanks , it seems that there is a problem with migrating the forum
after all , the site owner probebly knows abaot PHP more then me and noticed that the PHP mail functions doesnt work .

How can i install , configure it , also he suggeted to send me
*.frm , *.MYI,*.MYD files of the data(DB) and put it directly on the proper mysql directory but i couldny find the default mysql installation folder , should be something like mysql/lib

Thanks again ,

Post update
-------------
It seems that the third party software made errors in migrating the db after deleting the db content and loading the dump from
the console like you sugeted its all working .

It just now the mail function of PHP wich i dont know if its there .

Thanks guys ,
 
Last edited:
Hello,

If php says that mail() doesn't exist, just rebuild php after making sure that the /usr/sbin/sendmail symbolic link exists.
Code:
[server]# ll /usr/sbin/sendmail
lrwxrwxrwx  1 root   root   4 Jan  4 13:19 /usr/sbin/sendmail -> exim
[server]# cd /usr/local/directadmin/customapache
[server]# ./build clean
[server]# ./build php
Then restart apache.

John
 
Hi ,

After running

ll /usr/sbin/sendmail

Im getting

lrwxrwxrwx 1 root root 21 Aug 29 15:53 /usr/sbin/sendmail -> /etc/alternatives/mta

Its not exactly exim , so is that goog thing (exim symbolic link is there) ?

Thanks ,
 
Hello,

do a 'll' on /etc/alternatives/mta .. if it doesn't point to exim, then just run:

ln -sf exim /usr/sbin/sendmail

John
 
Hi ,

It does point to exim , i rebuilted PHP , hope it would be ok .

Thanks ,
 
Back
Top