Home >> FAQs/Tutorials >> MySQL Tutorials

MySQL Tutorial - Turn on Binary Logs

By: FYIcenter.com

(Continued from previous topic...)

How To Turn on Binary Logs?

If you want MySQL to write binary logs to a file, you can use the "--log-bin=fileBaseName" option at the "mysqld" command line. The tutorial exercise below shows you a good example on how to use this option:

>cd \mysql\bin
>mkdir \mysql\logs
>mysqld --log-bin=\mysql\logs\binary

Starts another command window, and enter the following commands:

>cd \mysql\bin
>mysql -u root -pretneciyf test

mysql> drop table test;
Query OK, 0 rows affected (0.12 sec)

mysql> create table test (name varchar(80));
Query OK, 0 rows affected (0.11 sec)

mysql> insert into test values ('dba.fyicenter.com');
Query OK, 1 row affected (0.03 sec)

(Continued on next topic...)

  1. What Is the MySQL Server Daemon - mysqld?
  2. What Are the "mysqld" Command Line Options?
  3. How To Start MySQL Server Daemon mysqld?
  4. How To Properly Shutdown MySQL Server Daemon mysqld?
  5. How Much Memory Does the Server Take?
  6. How To Turn on Query Logs?
  7. How To Turn on Error Logs?
  8. What Is Binary Log File?
  9. How To Turn on Binary Logs?
  10. How To Use mysqlbinlog to View Binary Logs?
  11. How To Run MySQL Server on a Different Port?
  12. How To Connect to MySQL Server on a Different Port?

MySQL Tutorials:

More...


Other Tutorials/FAQs:

More...


Related Resources:

More...


Selected Jobs:

More...