How to view the data from a .mysql file?

11,122

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.

Share:
11,122

Related videos on Youtube

Abdullah Al Imran
Author by

Abdullah Al Imran

I help companies make impactful data-driven decisions through utilizing and productionalizing AI and Data Science technologies. I'm a goal-oriented expert Data Science and Machine Learning professional with deep affection for data and proven expertise in developing and deploying end-to-end, highly scalable ML models and services. Predicting unknowns, discovering patterns, and revealing useful insights from data excites me the most. I'm dynamic in personality and a rapid learner who is always desperate for knowledge and wisdom. 𝐓𝐞𝐜𝐡𝐧𝐢𝐜𝐚𝐥 𝐒𝐤𝐢𝐥𝐥𝐬: 𝐏𝐫𝐨𝐠𝐫𝐚𝐦𝐦𝐢𝐧𝐠 𝐋𝐚𝐧𝐠𝐮𝐚𝐠𝐞𝐬: Python, R, Java SE, C++, C#, Matlab 𝐃𝐚𝐭𝐚 𝐀𝐧𝐚𝐥𝐲𝐬𝐢𝐬 𝐓𝐨𝐨𝐥𝐬: Pandas, NumPy, SciPy, statsmodels, PyMC3 𝐌𝐚𝐜𝐡𝐢𝐧𝐞 𝐋𝐞𝐚𝐫𝐧𝐢𝐧𝐠 𝐓𝐨𝐨𝐥𝐬: scikit-learn, PyTorch, Tensorflow, FBProphet 𝐍𝐋𝐏 𝐅𝐫𝐚𝐦𝐞𝐰𝐨𝐫𝐤𝐬: Hugging Face, spaCy, NLTK, Gensim, Rasa AI, AllenNLP 𝐕𝐢𝐬𝐮𝐚𝐥𝐢𝐳𝐚𝐭𝐢𝐨𝐧 𝐓𝐨𝐨𝐥𝐬: Tableau, Streamlit, Matplotlib, Seaborn, Plotly, D3.js 𝐃𝐚𝐭𝐚𝐛𝐚𝐬𝐞 𝐒𝐲𝐬𝐭𝐞𝐦𝐬: MySQL, SQLite, PostgreSQL, Elasticsearch Index 𝐂𝐥𝐨𝐮𝐝 𝐏𝐥𝐚𝐭𝐟𝐨𝐫𝐦𝐬: Google Cloud Platform (GCP), Amazon Web Services (AWS) 𝐁𝐢𝐠 𝐃𝐚𝐭𝐚 𝐓𝐨𝐨𝐥𝐬: Apache Spark (PySpark, Spark SQL, MLlib), Dask, Hadoop, Hive 𝐃𝐞𝐯𝐞𝐥𝐨𝐩𝐦𝐞𝐧𝐭 𝐒𝐤𝐢𝐥𝐥𝐬: FastAPI, Flask, Selenium, Beautiful Soup, Web Technologies 𝐃𝐞𝐩𝐥𝐨𝐲𝐦𝐞𝐧𝐭 𝐓𝐨𝐨𝐥𝐬: Docker, MLFlow, AWS SageMaker 𝐕𝐞𝐫𝐬𝐢𝐨𝐧 𝐂𝐨𝐧𝐭𝐫𝐨𝐥: Git (GitHub, Bitbucket) 𝐎𝐩𝐞𝐫𝐚𝐭𝐢𝐧𝐠 𝐒𝐲𝐬𝐭𝐞𝐦𝐬: Ubuntu, macOS, Windows

Updated on September 18, 2022

Comments

  • Abdullah Al Imran
    Abdullah Al Imran over 1 year

    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?