![]() ![]() and your last full backup was run at 12 p.m. Let’s say you have an erroneous transaction that you run at 3:05 p.m. There are many reasons for using mysqlbinlog to process binary log files, but in this case, it was used for point-in-time recovery. The database version was 10.1.38-MariaDB. In this case, the server was MariaDB, but the utilities are the same. In case you didn’t know, MySQL is a simple SQL shell with input line editing capabilities, while mysqlbinlog is a utility for processing binary logs a MySQL server. These are just few ways, there are many softwares available to import the sql file.In one of my latest database restore jobs, I was helping a MySQL client with issues related to mysqlbinlog and I wanted to share it here. ![]() So, this way sql file can be import to remote server. mysql -u database_user -p database_name < path/to/sql_file.sql First upload the sql file to remote server through git or FTP application like FileZilla and you can directly import database. There is also one method to import sql file through command line. ssh _server mysql -u database_user -ptestpass database_name < path/to/sql_file.sql If this not work for you, first connect to ssh and append mysql command. mysql -u database_user -p -h rver_ database_name < path/to/sql_file.sql To import the SQL script file, run below command from your Terminal. If you have enough knowledge about bash script and MySQL commands, this will be easiest way. This is fast way to import SQL script but it is sometimes not easy and takes time to run proper command line. This will run SQL file to database server. Select the file from file input and click Go button. Now from the left bar select the database where you want to import the sql file. First, from your browser login to server phpMyAdmin portal either through Cpanel menu or from your database server link. If they not provide phpMyAdmin, we can simply install from the official phpMyAdmin Link. Many web hosting providers provides phpMyAdmin tool to manage database. It is easy to manage MySQL and MariaDB database through phpMyAdmin. PhpMyAdmin is free and open-source web application written in PHP. Select the database name and default character set like utf8 and click Run button. ![]() To import the SQL file from local system, click File > Run SQL Script. If you want to create new database, click Create New Schema button from menubar, write database name and apply the changes. We will use Open-source software to import sql file.įirst create the connection on MySQL Workbench dashboard and lauch the server. The Community Edition is a full featured product still we can do all basic stuff in Open-source software. MySQL Workbench is open-source as well as Community Edition visual database management software developed by Oracle Corporation. We will go through few ways to import database from SQL file in MySQL. We can also use command line to import file from remote desktop. There are so many GUI applications like MySQL Workbench as well as web application like phpmyadmin available to work with Mysql server. There are so many ways you can import database from sql file. Also when changing your server, you need to export database from old server and import to new one. While working on web application, often you need to insert data from sql file.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |