How do you start and stop MySQL on Windows?

You can start and stop the MySQL service just like any other service.

Open a cmd window and type:

  • net start MySQL ( To start MySQL service ).
  • net stop MySQL ( To stop MySQL service ).

How are ENUMs and SETs represented internally?

ENUMs and SETs are used to represent powers of two because of storage optimizations.

What are ENUMs used for in MySQL?

You can limit the possible values that go into the table. CREATE TABLE months (month ENUM ‘January’, ‘February’, ‘March’,…); INSERT months VALUES (’April’);

How do you convert between Unix timestamps and MySQL timestamps?

UNIX_TIMESTAMP converts from MySQL timestamp to Unix timestamp, FROM_UNIXTIME converts from Unix timestamp to MySQL timestamp.

What’s the difference between Unix timestamps and MySQL timestamps ?

Internally Unix timestamps are stored as 32-bit integers, while MySQL timestamps are stored in a similar manner, but represented in readable YYYY-MM-DD HH:MM:SS format.

How do you get the month from a timestamp ?

SELECT MONTH(column_timestamp) from table_name;

How do you convert a string to UTF-8?

Using following way you can convert a string to UTF-8

SELECT (table_name USING utf8);