• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

The Geek Diary

CONCEPTS | BASICS | HOWTO

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • Linux Services
    • VCS
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
    • Data Guard
  • DevOps
    • Docker
    • Shell Scripting
  • Interview Questions
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

Archives for July 2020

“Access denied for user ‘username’@’hostname’ (using password: YES)” – Error while connecting MySQL with PHP

By admin

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. This expansion will change the password sent to MySQL. There are 3 ways to avoid this problem: Escape the character with a … [Read more...] about “Access denied for user ‘username’@’hostname’ (using password: YES)” – Error while connecting MySQL with PHP

Filed Under: mysql, PHP

How to Restrict MySQL User Creation with Blank Password

By admin

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 completely. But there are settings that can be used to come closer to our objective. Set the below SQL mode on the MySQL instance: SET SQL_MODE = NO_AUTO_CREATE_USER Using NO_AUTO_CREATE_USER … [Read more...] about How to Restrict MySQL User Creation with Blank Password

Filed Under: mysql, MySQL Cluster

Beginners Guide to MySQL Data Types

By admin

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 performance. Choosing the best data type for the column has a rather small effect on performance in an individual record, but as the … [Read more...] about Beginners Guide to MySQL Data Types

Filed Under: mysql, MySQL Cluster

What is the purpose of utmp, wtmp and btmp files in Linux

By admin

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 files. So, we can't use our normal text tools, such as less or grep, to read them or extract information from them. Instead, we'll use some special tools that can read these … [Read more...] about What is the purpose of utmp, wtmp and btmp files in Linux

Filed Under: Linux

“expect” script to provide password to mysql_config_editor

By admin

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 is considered secure enough for the operation that is accessible by the script. … [Read more...] about “expect” script to provide password to mysql_config_editor

Filed Under: mysql, MySQL Cluster

How to (Correctly) Change the UID and GID of a user/group in Linux

By admin

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 Group: group01 Existing UID: 800 Existing GID: 700 New UID: 900 New GID: 600 Pre-requisites 1. Make sure the user for which UID and GID is to be changed is currently not having any active process running in the … [Read more...] about How to (Correctly) Change the UID and GID of a user/group in Linux

Filed Under: Linux

PHPMyAdmin :: Existing configuration file (./config.inc.php) is not readable

By admin

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 to resolve the issue: 1. Login to the server with root user. 2. View current the permissions … [Read more...] about PHPMyAdmin :: Existing configuration file (./config.inc.php) is not readable

Filed Under: Apache

cp: omitting directory – error while copying a directory in Linux

By admin

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' command. In order to avoid this error use the "-r" or the "-a" option in the copy command. From the man page of 'cp' command: # man cp -R, -r, --recursive copy … [Read more...] about cp: omitting directory – error while copying a directory in Linux

Filed Under: Linux

ORA-00257:Archiver Error, Connect Internal Only Until Freed

By admin

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 mode Archive Mode Automatic archival Enabled Archive Destination USE_DB_RECOVERY_FILE_DEST Oldest online … [Read more...] about ORA-00257:Archiver Error, Connect Internal Only Until Freed

Filed Under: oracle

How to Use user-defined Functions in awk

By admin

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 definition is: func function_name ([optional_arg] . . .) { statements } or function function_name ([optional_arg] . . .) { statements } The … [Read more...] about How to Use user-defined Functions in awk

Filed Under: DevOps, Shell Scripting

Next Page »

Primary Sidebar

Recent Posts

  • Basics of client connectivity in Oracle Data Guard configuration
  • ORA-354 ORA-353 and ORA-312: Possible corruption in Online Redo Log File Members in a Redo Log Group
  • How to relocate the redo log files to a different location on disk
  • Oracle Database: Redo log operations (Add/Drop/Change Location)
  • Archives
  • Contact Us
  • Copyright

© 2021 · The Geek Diary