How to get windows phpmyadmin databases (.SQL) backup from Ubuntu? - mysql

My windows10 is not starting up but I have installed Ubuntu along with windows.
I have some mysql databases in my windows environment which I need backup so is there any way to open windows version of the databases in ubuntu so I can export that databases.

after handling JoSSte above comment you need to run these command in terminal
mysql -u user_name -p this command will ask for password
after successfull above command , you can check your database using below command
show databases;
if your database is there you can export database using below command
mysqldump -u your_db_user_name -p [database_which_need_to_export] > database_name.sql
this command will give you sql file then you can import it using command or in phpmyadmin

Related

mysql shell line in windows doesn't work

i have installed mysql community, but when i write the comand mysql -u root -p windows says the command not exist...how can i resolve it?

MySQL remote access from windows cmd prompt

I am new to MySQL.
There is an environment where mysql is installed and DB set up in an Linux server.
Is it possible to access the db using windows command prompt?
What would be the best way to access the db remotely from windows machine?
If you are a new user , use some gui tool to control mysql like https://code.google.com/p/sqlyog/wiki/Downloads . It will be easier for you.
You have to use the -h option
mysql -u<user> -p -h <dbhost>
for example:
mysql -uroot -p -h myql.servername.com
Your user needs remote permissions at your host.

Access mysql for MAMP from command line

I have been learning Ruby on Rails and have been using the command line successfully to view and edit the database (using the mysql command).
I am now using MAMP and trying to install Wordpress. It appears that it is using a "different" mysql. I.e., databases I create via the command line aren't viewable in MAMP's phpmyadmin, and vice versa.
How can I access MAMP's mysql via the command line? I'm guessing that I need to specify the host when logging in with the mysql command, but I'm not sure what to put there. Since phpmyadmin exists at localhost:8888/phpMyAdmin, I tried using mysql -h localhost:8888 -u root -p, but that didn't work (error: Unknown MySQL server host 'localhost:8888').
MAMP installs it's own MySQL which means that you now have two MySQL instances installed on you machine.
try typing this in your terminal
/Applications/MAMP/Library/bin/mysql
You can also add this to your a bash_profile so you don't have to write /Applications/MAMP/Library/bin/mysql each time by running in terminal :
sudo vi ~/.bash_profile
and adding
alias mysql="/Applications/MAMP/Library/bin/mysql"
Then, from terminal you can run : mysql -uroot -proot notice theres no space for this to work.

How to use phpmyadmin mysql database using terminal in ubuntu 10.4?

Can any one help me to use phpmyadmin mysql database through terminal.
I am using ubuntu 10.4.
I guess the command like this /opt/var/usr/ mysql. I'm not sure about it.
In terminal just type:
mysql -u username -p
and afterwards you'll be prompted for your password.
Normally MySQL is added to /bin/ so no need to explicitly give a path to it.
Answer:
The Below command used to access phpmyadmin mysql database though terminal
/opt/lampp/bin/mysql -uroot -ppassword

Copying Mysql data to a remote server

I am running mysql server on my computer.I would like to copy the databases i have created and their tables to a remote server,and that is my website.Is there a software(a windows software) that can help me copy my databases to a remote server?.
If you have external access to both mySQL servers, HeidiSQL is a great Windows GUI for mySQL with a good export function.
Alternatively (also needing external access), install the mySQL binaries on your machine and do a simple
mysqldump -h hostname_source -u username -p databasename > dump.sql
mysql -h hostname_target -u username -p databasename < dump.sql