The Problem If the MySQL password contains a dollar sign character ‘$’, PHP is unable to connect and issues an error like: Access denied for user ‘username’@’hostname’ (using password: YES) Connections via other clients work correctly. The Solution PHP interprets dollar signs inside of double quotes as starting a variable name, which will be expanded. […]
Archives for July 2020
How to Restrict MySQL User Creation with Blank Password
Question: How can we not allow user creation with a blank password in MySQL? Using a blank password for a user is always a no go. In order to restrict user creation with blank password follow the steps given below: Before MySQL 5.6 In case of MySQL version below 5.6, this can not be achieved […]
Beginners Guide to MySQL Data Types
Data Types: Overview In MySQL, the available data types can be grouped into four major categories: Numeric: Numeric values Binary: Binary data strings Character: Text strings Temporal: Time and date values Within each category, there are numerous specific data types that use varying amounts of memory and disk space, and thus have varying effects on […]
What is the purpose of utmp, wtmp and btmp files in Linux
In a Linux system, everything is logged in a log file under the directory called /var/log. This directory contains logs related to different services and applications. In this directory we have some files such as utmp, wtmp and btmp. Unlike the system log files and the authentication log files, all of these files are binary […]
“expect” script to provide password to mysql_config_editor
Question: How to provide a password to mysql_config_editor without exposing it on the command line and without having to be present to type it? Use an expect script. For example: #!/usr/bin/env expect spawn mysql_config_editor set –skip-warn –login-path=client –user=root –password expect “Enter password: ” send “$env(my_password)\r” expect eof The password can be stored in whatever location […]
How to (Correctly) Change the UID and GID of a user/group in Linux
Changing the UID and GID of a user might seem a trivial task to most of the system admins. But it’s not so trivial and it involves a lot more changes in the backend. In this post, we have outlined the exact steps to change the UID and GID of a user “user01”. Username: user01 […]
PHPMyAdmin :: Existing configuration file (./config.inc.php) is not readable
The Problem I have just installed LAMP on my CentOS machine and while trying to access phpMyadmin thorugh cPanel, get below error: Existing configuration file (./config.inc.php) is not readable. The Solution The above error is due to the misconfiguration of permissions of the phpMyAdmin configuration file – /usr/local/cpanel/base/3rdparty/phpMyAdmin. Follow the steps outlined below in order […]
cp: omitting directory – error while copying a directory in Linux
The Problem When we are trying to copy a directory to other location, we get below error: $ cp /data01 /data02 cp: omitting directory ‘/data01′ $ The Solution The error above is a common mistake done by Linux newbies while copying a directory to other locations without using the recursive copy option in the ‘cp’ […]
ORA-00257:Archiver Error, Connect Internal Only Until Freed
The Problem Users cannot connect to the database : 0RA-00257:archiver error, connect internal only until freed ORA-16014:log 2 sequence# 231 not archived, no available destinations ORA-00312:online log 2 thread 1:’/[path]/redo02.log’ The Solution The most probable cause for this error is that the flashback recovery area must have gone full. SQL> archive log list; Database log […]
How to Use user-defined Functions in awk
User-Defined Functions You can create user-defined functions in a awk script file using the func or function keywords. Placement in the file is not important; the function definition can occur anywhere in the awk script. The function can take arguments (local to the function only) or use any existing variable. The syntax of a function […]