MySQL has a root user with a blank password. It's enough for local tasks. You may create another user with a password or change the root password using phpMyAdmin (http://localhost:81/) or Adminer (http://localhost:82/).

NB: phpMyAdmin may release some comments on a blank password for root. Do not pay attention to it.

MySQL config is winginx\mysql\my.ini.

Data directory: winginx\mysql\data

To connect to MySQL from PHP use mysql_connect function, then mysql_select_db function.

mysql_connect('localhost', 'mysql_user', 'mysql_password');

Instead of mysql_user, mysql_password, and db_name you should set real strings: username (in our case, root), password (in our case, too, empty string) and database name (you can create it using phpMyAdmin or Adminer).

Connecting to MySQL from Node.js

var mysql = require('mysql');

var client = mysql.createClient(); = 'localhost';
client.port = '3306';
client.user = 'root';
client.password = '';
client.database = 'test_db';

client.query('SELECT * FROM "test"', function(error, result, fields){

  if (!error){
    // Working with 'result' ...

    // Closing connection

Winginx © Alexei Shabalin, 2011-2023