Search blog

Showing posts with label phpMyAdmin. Show all posts
Showing posts with label phpMyAdmin. Show all posts

Thursday, February 2, 2023

[SOLVED] - Install phpMyAdmin & LAMP on Ubuntu 20.04 Desktop

Install phpMyAdmin & Linux, Apache, MySQL/MariaDB & PHP [LAMP] on Ubuntu 20.04 desktop.

Below you will find the instructions that I myself have tried and successfully implemented on my system.

 1. Install Apache Web Server

 sudo apt update  
 sudo apt install apache2  

2. Install MariaDB

 sudo apt install mariadb-server  
 sudo apt install mariadb-client  

After that, run the commands below to secure the MariaDB server by creating a root password, disallowing remote root access removing anonymous, and more.
 sudo mysql_secure_installation  
 If you've just installed MariaDB, and haven't set the root password yet, you should just press enter here.  
 Enter current password for root (enter for none): PRESS ENTER  
 Switch to unix_socket authentication [Y/n] n  
 Change the root password? [Y/n] n  
 Remove anonymous users? [Y/n] y  
 Disallow root login remotely? [Y/n] y  
 Remove test database and access to it? [Y/n] y  
 Reload privilege tables now? [Y/n] y  
 All done!  

3. Install PHP

 sudo apt install php7.4 php7.4-common php7.4-mysql php7.4-gmp php7.4-curl php7.4-intl php7.4-mbstring php7.4-xmlrpc php7.4-gd php7.4-xml php7.4-cli php7.4-zip  

4. Install phpMyAdmin

 sudo apt install phpmyadmin  

When prompted to choose the web server, select apache2 and continue.
   
Install phpMyAdmin, Apache, PHP, MySQL or MariaDB on Ubuntu 20.04 Desktop

When prompted again to allow web config-common to install a database and configure select Yes and press ENTER.

Then type and confirm a password.

Install phpMyAdmin, Apache, PHP, MySQL or MariaDB on Ubuntu 20.04 Desktop

After installing phpMyAdmin, open your web browser and browse to the server hostname or IP address followed by /phpmyadmin.
 http://localhost/phpmyadmin  
Install phpMyAdmin, Apache, PHP, MySQL or MariaDB on Ubuntu 20.04 Desktop
If you encounter the following error implement the solution below to resolve the issue:

ERROR: mysqli_real_connect(): (HY000/1698): Access denied for user 'root'@'localhost'

Open your terminal and run the following commands:
 sudo mysql -u root  
 use mysql;  
 update user set plugin='' where User='root';  
 flush privileges;  
 \q  
Now the LAMP cum phpMyAdmin should be working for you.

>> Ref:

Sunday, May 20, 2018

[SOLVED] - Delete Categories in Magento 2 using MySQL & phpMyAdmin

You can use the SQL code below to DELETE your Categories in your Magento 2 installation. It will reset your categories to as it was after a fresh installation.

Copy the code below and execute it as shown in the image:

[SOLVED] - Delete Categories in Magento 2 using MySQL & phpMyAdmin
Click on image to enlarge


Saturday, September 16, 2017

Reset AUTO_INCREMENT Value in MySQL

You can reset the AUTO_INCREMENT value in MySQL either by using a SQL command or by using phpMyAdmin.

NOTE: You cannot reset the counter to a value less than or equal to the value that is currently in use. For both InnoDB and MyISAM, if the value is less than or equal to the maximum value currently in the AUTO_INCREMENT column, the value is reset to the current maximum AUTO_INCREMENT column value plus one.

To reset the Primary Key Value to 1, you should either delete the table and create a new table or TRUNCATE the table and apply the command below. But DON'T do this, if you already have data in your table.

1. Using SQL Command:
 ALTER TABLE table_name AUTO_INCREMENT =1;  

where,
- table_name is the name of the table whose AUTO_INCREMENT value you want to reset.

2. Using phpMyAdmin Operation:
 - First open the table whose AUTO_INCREMENT value you would like to reset.
 - Once inside the table click on the Operation tabs as shown in the image below.

Click on image to enlarge

3. To save the changes you've made, click on Go.

Sunday, January 3, 2016

Updating PHP & MySQL in Ubuntu 14.04

1. Updating PHP 5.5 to PHP 5.6

To upgrade to a newer version of PHP 5.6 on Ubuntu 14.04, you can use Ondřej Surý's PPA. He is one of the Debian maintainers of the php5 package. Also not that this update will overwrite any change you made to your 'php.ini' files. So, I recommend you make a back up of your 'php.ini' file and later on you can use it as a reference file to make changes in your new 'php.ini' file.

To add the PPA and upgrade your packages, run:

 sudo apt-get install software-properties-common  
 sudo add-apt-repository ppa:ondrej/php5-5.6  
 sudo apt-get update  
 sudo apt-get upgrade  
 sudo apt-get install php5  

1. Updating MySQL 5.5 to MySQL 5.6

 step 1 : take a backup  
 mysqldump --lock-all-tables -u root -p --all-databases > dump.sql  
 step 2 : remove old mysql  
 sudo apt-get remove mysql-server  
 sudo apt-get autoremove  
 step 3 : install new version of mysql  
 sudo apt-get install mysql-client-5.6 mysql-client-core-5.6  
 sudo apt-get install mysql-server-5.6  
 step 4 : restore your data  
 mysql -u root -p < dump.sql  

3. If error after logging into phpMyAdmin:

If you happen to get an error as below:

'Your PHP MySQL library version 5.5.46 differs from your MySQL server version 5.6.27.....'

Run the following commands:

 sudo apt-get remove php5-mysql  

You might have to reinstall your phpMyadmin.

To reinstall phpMyadmin enter the following commands:

 sudo apt-get install phpmyadmin  

Saturday, October 3, 2015

[SOLVED] - Unable To Uninstall phpMyAdmin in Ubuntu 14.04

I was unable to uninstall my phpMyAdmin due to some error I committed while trying to install it. After that while trying to uninstall it I started to get the following errors:

Errors were encountered while processing:phpmyadminE: Sub-process /usr/bin/dpkg returned an error code (1) 

Eventually the steps below worked for me:

Step 1:

 cd /var/lib/dpkg/info/  

Step 2:

  ls -l phpmyadmin.*  
 -rw-r--r-- 1 root root  165 2008-03-05 21:42 phpmyadmin.conffiles  
 -rwxr-xr-x 1 root root  287 2008-03-05 21:42 phpmyadmin.config  
 -rw-r--r-- 1 root root 33524 2008-08-06 11:31 phpmyadmin.list  
 -rw-r--r-- 1 root root 51996 2008-03-05 21:42 phpmyadmin.md5sums  
 -rwxr-xr-x 1 root root 3286 2008-03-05 21:42 phpmyadmin.postinst  
 -rwxr-xr-x 1 root root 1762 2008-03-05 21:42 phpmyadmin.postrm  
 -rwxr-xr-x 1 root root 1762 2008-08-06 09:12 phpmyadmin.postrm.orig  
 -rwxr-xr-x 1 root root  339 2008-03-05 21:42 phpmyadmin.preinst  
 -rw-r--r-- 1 root root 22441 2008-03-05 21:42 phpmyadmin.templates  

Step 3:

Now delete the phpMyAdmin files:

 sudo rm -r phpmyadmin.*  

Step 4:

Verify whether the phpMyAdmin files are still around:

 sudo apt-get remove phpmyadmin  

You should get the following message 'Package 'phpmyadmin' is not installed, so not removed' which confirms all the phpMyAdmin files have successfully been removed.

Step 5:

Finally if you wish you may install phpMyAdmin again:

 sudo apt-get install phpmyadmin  

Monday, May 18, 2015

Increasing the Script Timeout Limit in phpMyAdmin in Ubuntu 15.04 and other LAMP Servers

If you are facing problems importing your database dump into your  MySQL server using phpMyAdmin follow the steps below to resovle the issue:

Open the 'config.inc.php' file located inside '/etc/phpmyadmin/config.inc.php' and add the following line:
 $cfg['ExecTimeLimit'] = 0;  

This will remove any time constraint in phpMyAdmin for database import.

Now make the following changes in your 'php.ini' file which is located at '/etc/php5/apache2/php.ini.' You will have to sudo and open your editor to make/commit the changes:
 post_max_size = 750M  
 upload_max_filesize = 750M  
 max_execution_time = 300  
 max_input_time = 540  
 memory_limit = 1000M  

Now finally restart your Apache Web Server:
 sudo service apache2 restart  

Sunday, December 28, 2014

Unable To Import Or Upload SQL Dump, Database in phpMyAdmin

If you are unable to import or upload your database dump into your phpMyAdmin and have been getting the following error:
No data was received to import. Either no file name was submitted, or the file size exceeded the maximum size permitted by your PHP configuration.
You can try the following code to resolve the issue:

 chmod -R 777 /var/lib/phpmyadmin/tmp  

Restart Apache:

 sudo service apache2 restart  

Friday, September 5, 2014

Drupal cache_rules error, Error: Tablespace for table abc exists. Please DISCARD the tablespace before IMPORT

I got these queer error today with my site viz:

Error #1. 'cache_rules does not exist in database'
Error #2: 'Error: Tablespace for table abc exists. Please DISCARD the tablespace before IMPORT' in XAMPP using phpMyAdmin & MySQL.

There are various ways to fix these errors. I've listed them below:

Solution 1. Manually create the table using the following SQL query:

DROP TABLE cache_rules ;
CREATE TABLE IF NOT EXISTS `cache_rules` (
  `cid` varchar(255) NOT NULL DEFAULT '' COMMENT 'Primary Key: Unique cache ID.',
  `data` longblob COMMENT 'A collection of data to cache.',
  `expire` int(11) NOT NULL DEFAULT '0' COMMENT 'A Unix timestamp indicating when the cache entry should expire, or 0 for never.',
  `created` int(11) NOT NULL DEFAULT '0' COMMENT 'A Unix timestamp indicating when the cache entry was created.',
  `serialized` smallint(6) NOT NULL DEFAULT '0' COMMENT 'A flag to indicate whether content is serialized (1) or not (0).',
  PRIMARY KEY (`cid`),
  KEY `expire` (`expire`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Cache table for the rules engine to store configured items.';


Solution 2: If the above solution doesn't work for you and you get error relating to 'tablespace' saying 'Error: Tablespace for table abc exists. Please DISCARD the tablespace before IMPORT' in XAMPP using phpMyAdmin & MySQL.'

There might be either one of the two or both the files 'tablename.ibd' or 'tablename.frm' files left in the location 'C:\xampp\mysql\data\database_name\' Delete those files, in our case it will be 'cache_rules.ibd' or 'cache_rules.frm.' Your problem should be resolved now and you should be able to create/import the 'cache_rules' table.

You might also check the following solution for your 'tablespace' issue: http://tinyurl.com/me69h6x

Sunday, April 7, 2013

Increase Max Upload Size in phpMyAdmin

To increase the max upload size in phpMyAdmin simply change this value in php.ini file. This file is located inside the php folder. Once changed restart your Apache server.

post_max_size = 100M
upload_max_filesize = 100M

Keep both the above values equal else phpMyAdmin will use the smallest values from both the given values.

 

Sunday, October 28, 2012

phpMyAdmin: Bypass File Upload Size Limit

When you want to import a large SQL query in phpMyAdmin, you can run into problems as the default upload size limit is restricted by whatever it is in the php.ini file - and often, you cannot change this or simply don't want to. It tends to default to a measly 2MB.
However, there's a feature that will allow you to FTP your SQL file to an upload directory of your choosing, and then instruct phpMyAdmin to run the query file. Here's how you do it.

To read more please visit: http://www.givegoodweb.com/post/82/phpadmin-upload-restriction

Top 5 Posts (Weekly)