English Русский

FAQ

General questions

Q: Profiler shows activity on the server side, but does not show any queries or sessions
A: Don’t forget to press the Start button to start capturing.
Q: I connected to MySQL but Sessions are not shown.
A: Neor Profile SQL works as proxy server. It can show sessions which go via profiler only. Your app (or site) must work with profiler as well as with MySQL server. The Profiler need only TCP incomming-connections. And you will see results in Tab Sessions.
Q: Why are there some queries in Session with zero time?
A: Queries with zero time run very fast without delay. Such requests can be cached database or run very quickly, for example if you have a powerful server and a well optimized table.
Q: What does Time % and Duration % of the Session mean?
A: "Time %" — is the proportion of the total execution time of the Session. "Duration %" — is the proportion of the longest query in the session (the ratio of the very long request).
Q: I'm using JetProfiler and it settings are simpler.
A: JetProfiler gets information from MySQL server by 'show status' command and can't get all information of sessions. It works discrete. Neor Profile SQL sniffs all queries to the database. And for that needs to get flow from your app.
Q: Button Profile in the SQL editor tab does not show result
A: The Profile function in the SQL editor works through command SHOW PROFILES. Which added in MySQL Community Server since 5.0.37 version. Check your version of the MySQL Server.
Q: How can I use the profiler with console?
A: For console you shall use the log method with command tail. Or use one of special console tool. Neor Profile SQL is the developer's product in windowed OS.
Q: The Profiler works, but main live histogram doesn't shown data?
A: This graph may not work if your account not able to start command SHOW STATUS. If you have not rights to your database. Try to check your rights on DB server.
Q: How to run installer in the Silent mode?
A: sqlprofiler-4.1.1.exe /S /D:C:Program Files (x86)Neor Profile SQL

Windows

Q: How to check Profiler connection?
A: Use MySQL console client for connecting to the profiler. If you see self session in Sessions Tab then it works properly.
Example:
mysql --host=127.0.0.1 --user=LOGIN --password=PASSWORD --port=4040
when you try simple SQL command:
show tables;
And look in Session Tab in the Profiler.

Linux

Q: I can't to connect via localhost.
A: In Linux localhost associates with socket connection, but Neor Profile SQL works only with TCP connections. In profiler, set the server name to 127.0.0.1 instead of localhost. And do the same in your app.
Example:
mysql --host=127.0.0.1 --user=LOGIN --password=PASSWORD --port=4040
Q: I can't to connect via 127.0.0.1.
A: Check type of connection in your app. Also you can setup connection via local socket. Socket connection type not need a port.
Q: How to install Neor Profile SQL under OpenSUSE?
A: Today we support only DEB installation. Which works under Ubuntu, Debian and compatible Linux distributions. You can make the RPM file format by yourself and contribute.
Q: Why I can't to catch Sysbench queries?
A: Profiler need only TCP incoming-connections. Run Sysbench like this:
sysbench --test=oltp --mysql-host=127.0.0.1 --mysql-port=4040 --mysql-user=root --mysql-password=password prepare

Mac OS X

Q: Profiler cannot connect to MAMP MySQL server.
A: Connection problem in bind network connections in MySQL config:
  1. МАМР
    Free version – copy standart MySQL config file in folder
    /Applications/MAMP/conf/my.cnf
    Pro version – open menu FILE – EDIT – MySQL template
  2. in config my.cnf remove string skip-networking
  3. in Profiler Settings change DB server host localhost to 127.0.0.1

Changing MySQL port in your scripts

Default port of Neor Profile SQL is 4040. For catching SQL queries you must change in your script default host and port 3306 of MySQL connection. Below shows how it to do.
PHP
$ link = mysql_connect('127.0.0.1:4040', 'YOUR_DATABASE', 'YOUR_PASSWORD');
http://php.net/manual/en/function.mysql-connect.php
PHP PDO
$ dsn = 'mysql:dbname=YOUR_DATABASE;host=127.0.0.1;port=4040';
http://www.php.net/manual/en/pdo.construct.php
Java
URL = jdbc:mysql://127.0.0.1:4040/YOUR_DATABASE?user=YOUR_USER&password=YOUR_PASSWORD
http://www.vogella.com/articles/MySQLJava/article.html
.net
string connStr = "server=127.0.0.1;port=4040;database=YOUR_DATABASE;user=YOUR_USER;password=YOUR_PASSWORD;";
http://dev.mysql.com/doc/refman/5.1/en/connector-net-tutorials-intro.html
Ruby
con = Mysql.new '127.0.0.1:4040', 'YOUR_USER', 'YOUR_PASSWORD'
http://zetcode.com/db/mysqlrubytutorial/
Python
con = _mysql.connect('127.0.0.1:4040', 'YOUR_USER', 'YOUR_PASSWORD', 'YOUR_DATABASE')
http://zetcode.com/db/mysqlpython/

Changing DB port in popular CMS/Framework

Wordpress
File: wp-config.php
Code: define('DB_HOST', 'localhost:4040');
Laravel
File: .env
Code:
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=4040
File: config/database.php
Code:
'mysql' => [
    'driver' => 'mysql',
    'url' => env('DATABASE_URL'),
    'host' => env('DB_HOST', '127.0.0.1'),
    'port' => env('DB_PORT', '4040'),
    'database' => env('DB_DATABASE', 'YOUR_DB'),
    'username' => env('DB_USERNAME', 'YOUR_USER'),
    'password' => env('DB_PASSWORD', 'YOUR_PASS'),
    'unix_socket' => env('DB_SOCKET', ''),
    'charset' => 'utf8mb4',
    'collation' => 'utf8mb4_unicode_ci',
    'prefix' => '',
    'prefix_indexes' => true,
    'strict' => true,
    'engine' => null,
    'options' => extension_loaded('pdo_mysql') ? array_filter([
            PDO::MYSQL_ATTR_SSL_CA => env('MYSQL_ATTR_SSL_CA'),
        ]) : [],                                                                    
    ],
PrestaShop
File: config/settings.inc.php
Code: define('_DB_SERVER_', 'localhost:4040');
OpenCart
File: config.php
Code: define('DB_HOSTNAME', 'localhost:4040');
Drupal
File: sites/default/settings.php
Code:
$ databases = array (
      'default' => 
      array (
        'default' => 
        array (
          'database' => 'YOUR_DB',
          'username' => 'YOUR_USER',
          'password' => 'YOUR_PASS',
          'host' => 'localhost',
          'port' => '4040',
          'driver' => 'mysql',
          'prefix' => '',
        ),
), );
Joomla
File: configuration.php
Code: public $ host = 'localhost:4040';
Bitrix
File: bitrix/php_interface/dbconn.php
Code: $ DBHost = "localhost:4040";
HostCMS
File: config/database.php
Code:
return array (
        'default' => array (
            'driver' => 'mysql',
            'host' => 'localhost:4040',
            'username' => 'YOUR_USER',
            'password' => 'YOUR_PASS',
            'database' => 'YOUR_DB'
        )
    );
Magento Commerce
File: config.php
Code: $ dbhost = "localhost:4040";
osCommerce
File: admin/includes/configure.php
Code: define('DB_SERVER', 'localhost:4040'); File: includes/configure.php
Code: define('DB_SERVER', 'localhost:4040');
Typo3
File: typo3conf/LocalConfiguration.php
Code:
    'DB' => array(
            'database' => 'YOUR_DB',
            'extTablesDefinitionScript' => 'extTables.php',
            'host' => 'localhost:4040',
            'password' => 'YOUR_PASS',
            'username' => 'YOUR_USER',
        ),
SugarCRM
File: config.php
Code:
  array (
        'db_host_name' => 'localhost',
        'db_host_instance' => 'SQLEXPRESS',
        'db_user_name' => 'YOUR_USER',
        'db_password' => 'YOUR_PASS',
        'db_name' => 'YOUR_DB',
        'db_type' => 'mysql',
        'db_port' => '4040',
        'db_manager' => 'MysqliManager',
      ),