Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
my colleague send a .sql file to me , which is mysqldump from linux mysql db , I want to use XAMPP ( running in windows ) to connect it , I tried to put this files ( .php , .sql files ) to datadir , but still not connect it , the error is as below.
"throw new CDbException('CDbConnection failed to open the DB connection: '." , it seem can not connect the db ,
Would advise does XAMPP supports the .sql db which export from mysql db ? do I need to install any program / driver to use it ? what is the possible reason of the error ? thanks
XAMPP runs MySQL so the import shouldn't be any problem. XAMPP comes with PHPMyAdmin so you could use that to import a database if you don't want to use the command line.
*Do make a backup before messing with databases.
**Please note XAMPP is experimental: you should avoid exposing it to public / hostile networks.
Last edited by unSpawn; 04-27-2014 at 02:06 PM.
Reason: //More *is* more
XAMPP runs MySQL so the import shouldn't be any problem. XAMPP comes with PHPMyAdmin so you could use that to import a database if you don't want to use the command line.
*Do make a backup before messing with databases.
**Please note XAMPP is experimental: you should avoid exposing it to public / hostile networks.
thanks reply ,
does it mean XAMPP is not support to use SQL db , it only support mysql db , so that I have to import the data to mysql db ?
As Moderator said, you should use mysql client i.e. phpmyadmin to import export files. If your file is in .sql format with correct syntax of queries, it should be imported by mysql.
when it asks for password, Just press the return key without enter anything.
If you are not able to log in using host "localhost", you can try your IP or 127.0.0.1
As Moderator said, you should use mysql client i.e. phpmyadmin to import export files. If your file is in .sql format with correct syntax of queries, it should be imported by mysql.
You can try command line to import a database.
If you do not have username password, it means it may be root and blank. In case you can try
when it asks for password, Just press the return key without enter anything.
If you are not able to log in using host "localhost", you can try your IP or 127.0.0.1
thanks reply ,
The .sql files are exported from linux , what I would like to do is import this files to mysql db in windows ( not in linux ) , phpmyadmin can do that ? thanks
thanks reply ,
The .sql files are exported from linux , what I would like to do is import this files to mysql db in windows ( not in linux ) , phpmyadmin can do that ? thanks
Yes phpmyadmin can do that.
The default import file size may be 2 MB but you can increase in your php.ini.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.