I have a .mysql database file. I need to open it and view the data. I've MySQL Server & MySQL Workbench installed into my Ubuntu 14.04.

Now how do I open the .mysql file and view the data inside it?


The data is visible in any text editor, albeit it is in mysql format, to put it in a database you can import it to one, if you want you can create a database with "create database" command, next if you want to assign a separate user create a separate user with "grant" command for that database, flush privileges and quit mysql prompt. Now you can import .sql file to database by: mysql - u "username" -p 'databasename' < filename.sql I use an extra space inbetween -p and databasename so it will prompt for password and not log the mysql user password in the system command history. if you require the actual commands let me know. If you are looking for an easier option to view install phpmyadmin and import the .sql file. this will give you a frontend to view the data.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.