View Full Version : SQL's
pilpelet
02-19-2004, 02:53 PM
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 .
ProWebUK
02-20-2004, 07:48 AM
mysql -u username -ppassword < dump.sql
Chris
pilpelet
02-20-2004, 09:31 AM
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 ?
DirectAdmin Support
02-20-2004, 10:22 AM
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
ProWebUK
02-20-2004, 06:52 PM
Originally posted by pilpelet
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
pilpelet
02-21-2004, 07:31 AM
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 ,
ProWebUK
02-21-2004, 09:31 AM
/var/lib/mysql is the directory.
Chris
DirectAdmin Support
02-21-2004, 12:17 PM
Hello,
If php says that mail() doesn't exist, just rebuild php after making sure that the /usr/sbin/sendmail symbolic link exists.
[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
pilpelet
02-21-2004, 01:53 PM
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 ,
DirectAdmin Support
02-21-2004, 11:35 PM
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
pilpelet
02-22-2004, 09:53 AM
Hi ,
It does point to exim , i rebuilted PHP , hope it would be ok .
Thanks ,
Powered by vBulletin™ Version 4.0.4 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.