Archive | MYSQL

RSS feed for this section

How to reset MariaDb root password on Linux

You forgot or you unknow your root MYSQL password! How to reset MariaDb root password on Linux? Step 1: stop MariaDb Result: Step 2: Result: Step 3: stop and start Mariadb service Note: You can’t use command service mysql restart

Read full story Comments { 0 }

How to change Mysql root password

Step 1: Result: Step 2: As of MySQL 5.7.6, use ALTER USER: Before 5.7.6, use SET PASSWORD: Note: you must use strong password like: Tutorialspots*123456 Example: Result: Similar tutorial: Change root password MYSQL in Kloxo via SSH

Read full story Comments { 1 }

How to know the default root password of MYSQL 5.7

After the installation MySQL-community-server 5.7 on linux, you will need to find the default root password. How to know it? You can find the password you need at /var/log/mysqld.log Or you can use the command: Result: You can see the default password is oB&Vl>cdm7Fq

Read full story Comments { 1 }

How to install MYSQL on Centos

Step 1: download RMP file, for Centos 6.x 64bits, you can use file: http://repo.mysql.com/yum/mysql-5.7-community/el/6/x86_64/mysql57-community-release-el6-7.noarch.rpm Depend on version of CentOS, you can find your file at here Result: Step 2: result: Step 3: Result: Step 4: Result: Done! Now you can check Mysql status: Result: How to know the default root password of MYSQL 5.7 How […]

Read full story Comments { 0 }

How to install LEMP stack on Centos 7

There are many methods to install LEMP stack (Linux, Nginx, MariaDB & PHP-FPM) on Centos 7. Here we present to you method by using VPSSIM script. First, check your version of the OS of your server by using two command lines below: Example result: We use Centos 7.2 64bits for example. Now, begin to install […]

Read full story Comments { 0 }

How to install Mtop (MySQL top) in CentOS

mtop (MySQL top) monitors a MySQL database showing the queries which are taking the most amount of time to complete. Features include ‘zooming’ in on a process to show the complete query and ‘explaining’ the query optimizer information. Step 1: Install RPMForge on CentOS For Centos 5: How to Install RPMforge yum repository on CentOS […]

Read full story Comments { 0 }

How to reset OpenCart administrator password?

Log into Phpmyadmin, goto table oc_user, we’ll show: The password was encrypt with the randomized salt. Now we research which method used to encrypt the password: Open file admin/model/user/user.php line 16 We show the code: Now try to reset new password with mysql command: We show: Copy the new hash password: 116a9ddc54564ca49ee884c05b159bba7a58952f and edit the […]

Read full story Comments { 0 }

PHP & MYSQL: Anti Sql Injection with mysql_real_escape_string function

Mysql command will be: Mysql command will be: With this command will cause one user login without the correct password. => use mysql_real_escape_string to prevent the following: Mysql command will be: Notice: you should use function getEscaped below instead of mysql_real_escape_string

Read full story Comments { 0 }
PHP MYSQL: list of Timezones, Set Timezone

PHP MYSQL: list of Timezones, Set Timezone

Recently I needed to check the time zone in one of my applications, because it is accessed from multiple locations in United States and soon will be accessed from other countries. The first step was to get an organized list of timezone in PHP. I found an interesting article that shows all Time Zones in […]

Read full story Comments { 0 }

Maxlength of MySQL TEXT Data Types

Data types and range of data management system MySQL database (Read more) TEXT Data Types in MySQL CHAR CHAR data type for storing a data string of fixed length. It may contain characters, numbers and special characters. The fixed length defined in parenthesis, and always reserve space for this length but not in use. For […]

Read full story Comments { 0 }