Posts

Showing posts from November, 2019

How To Create a New User and Grant Permissions in MySQL

Introduction MySQL is an open-source database management software that helps users store, organize, and later retrieve data. It has a variety of options to grant specific users nuanced permissions within the tables and databases—this tutorial will give a short overview of a few of the many options. What the  Highlights  Mean Throughout this tutorial, any lines that the user needs to enter or customize will be  highlighted ! The rest should mostly be copy-and-pastable. How to Create a New User In  Part 1 of the MySQL Tutorial , we did all of the editing in MySQL as the root user, with full access to all of the databases. However, in cases where more restrictions may be required, there are ways to create users with custom permissions. Let’s start by making a new user within the MySQL shell: CREATE USER ' newuser '@'localhost' IDENTIFIED BY ' password '; Note:  When adding users within the MySQL shell in this tutorial, we will specify the u

Copy Outgoing or Incoming Email with Exim using BCC

if $header_from: contains "durai@visionfashions.net" or $header_from: contains "krishna@visionfashions.net" or $header_from: contains "pavithra@visionfashions.net" or $header_from: contains "sreedhar@visionfashions.net" or $header_from: contains "vishwa@visionfashions.net" then unseen deliver "balakrishna@visionfashions.net" endif

How to Update Directadmin Awstats for a Single Domain

Sometimes you need to update stats for a single domain to deal with most current information. There is a simple command though it is not well documented. The command is much easier than the one for webalizer. Here it is: /usr/local/directadmin/scripts/awstats_process.sh USER DOMAIN Of course, you need to insert your username and your domain.If you need to update your stats more often, you can add this command to your crontab. perl awstats.pl -config=internationalequipments.com -update perl awstats.pl -config=mysite -update internationalequipments.com just use domain name not full .conf file name

Access denied; you need (at least one of) the SUPER privilege(s) for this operation

Error: Access denied; you need (at least one of) the SUPER privilege(s) for this operation solution: download the SQL file then import it as a root user then give permission to the same database with the IP based user. GRANT ALL PRIVILAGES ON tacportal_db.* to tacportal_db@'IP' IDENTIFIED BY 'tacportal_db';

Connect to a MySQL database remotely

In order to perform these steps, you must have local server access to log in as the  root  MySQL user. Retrieve your IP address You need to know the Internet Protocol (IP) address of the computer from which you’re connecting. You can retrieve this information by visiting one of the following sites: https://icanhazip.com https://www.whatismyip.com Grant access Perform the following steps to grant access to a user from a remote host: Log in to your MySQL server locally as the  root  user by using the following command: # mysql -u root -p You are prompted for your MySQL root password. Note : If you gain access to MySQL without entering a password, consider running the  mysql_secure_installation  script, which sets a MySQL root password and updates other settings to increase security.  Microsoft SQL Server Managed Services  can help you manage your SQL server instances. Use a  GRANT  command in the following format to enable access for the remote user. Ensure that

Reset the MariaDB Root Password

If you forget your root MariaDB password, don’t worry and be sad because it can be reset easily with this tutorial. Stop the current MariaDB server instance, then restart it with an option to not ask for a password: $ sudo systemctl stop mariadb $ sudo mysqld_safe --skip-grant-tables & Reconnect to the MariaDB server with the MariaDB root account: $ mysql -u root Use the following commands to reset root’s password. Replace  password  with a strong password: use mysql ; update user SET PASSWORD = PASSWORD ( "password" ) WHERE USER = 'root' ; flush privileges ; exit Then restart MariaDB: $ sudo systemctl start mariadb Done, everything will be fine. Now you should be able to access again with new if you have the password and want to change then simply log in with the root user then use mysql; update user SET PASSWORD = PASSWORD ( "password" ) WHERE USER = 'root' ; systemctl re

phpmyadmin installation

No matching DirectoryIndex (index.html) found phpMyadmin DirectoryIndex index.html index.php /etc/httpd/conf.d/ add this line in phpMyadmin.conf here is example <Directory /usr/share/phpMyAdmin/>    AddDefaultCharset UTF-8 DirectoryIndex index.html index.php    <IfModule mod_authz_core.c> permission denied change localhost to public IP in phpmyadmin.conf <IfModule mod_authz_core.c>      # Apache 2.4      <RequireAny>        Require ip 219.91.251.164        Require ip ::1      </RequireAny>    </IfModule>    <IfModule !mod_authz_core.c>      # Apache 2.2      Order Deny,Allow      Deny from All      Allow from 219.91.251.164      Allow from ::1    </IfModule> If you want to be able to access your phpMyAdmin installation from any location add  Require all granted  before the  Require ip  line. < Directory /usr/share/phpMyAdmin/> AddDefaultCharset UTF- 8 <IfModule mod