[SOLVED] What are the steps to reinstall mysql server using Ubuntu Terminal?
https://www.zyxware.com/sites/default/files/styles/user_image/public/default_images/index.png?itok=2YmREnrP
BY sarika.k
3 years ago
MySQL
0
comments comment

I have faced several issues with MySQL installation while setting it up in my system. Hope this article will help you fix the mysql related issues. Here, I document the various steps I have taken to update MySQL installation.

To remove or uninstall Mysql Client Core 5.5 separately, I used the following commands:

sudo apt-get remove --purge mysql-server mysql-client mysql-common
sudo apt-get remove --purge mysql-client-core-5.5
sudo apt-get autoremove
sudo apt-get autoclean
sudo rm -rf /var/lib/mysql

Now install or reinstall mysql client and server:

sudo apt-get install mysql-server
sudo apt-get install mysql-client
sudo apt-get install mysql-workbench

Please find other solved issues related to MYSQL here.

Please feel free to clarify your doubts here.


RELATED ARTICLE

more_horiz
close

on 11th June 2008 / by webmaster
Most of the web based systems that we build at Zyxware uses Drupal as the content framework. The following are the steps involved in setting up Apache, PHP, MySQL and Drupal on a freshly installed Ubuntu 8.04 system. If you follow the instructions you should be able to set it up as is but if you face problems let us know and we will try to help you. This is divided into subsections each dealing with a specific task. 1. Apache2 Server Setup 2. Installing MySQL and PHP5 3. Installing Drupal & Configuring Drupal 4. Clean URLs Configuration in Apache2 for Drupal 5. Other Tweaks Apache2, MySQL, PHP Setup 1. Run the following command to install apache on your machine sudo apt-get install apache2 libapache2-mod-php5 sudo apt-get install mysql-client mysql-server mysql-query-browser mysql-admin mysql-navigator php5-mysql php5-gd sudo /etc/init.d/apache2 restart 2. Install PHPMyAdmin. After this, make changes in the confinguration file to support PHPMyAdmin. You can skip this step if you prefer to use MySQL GUI based administration. sudo apt-get install phpmyadmin sudo gedit /etc/apache2/httpd.conf At the bottom add the following # Enable PHPMyAdmin Include /etc/phpmyadmin/apache.conf sudo /etc/init.d/apache2 restart 3. Enable usedir module in apache2 to allow URLs of the following format http://localhost/~username. Also enable mod_rewrite to allow for Drupal Clean URLs cd /etc/apache2/mods-enabled sudo ln -s ../mods-available/userdir.load sudo ln -s ../mods-available/userdir.conf sudo ln -s ../mods-available/rewrite.load sudo /etc/init.d/apache2 reload 4. Create folder /home/<username>/public_html -- > this is the folder which we are going to use as the document root for local development. So you will be accessing your local websites as http://localhost/~username/sitename 5. Edit /etc/apache2/mods-available/userdir.conf and change the AllowOverride line to just read AllowOverride All Install Drupal 1. Download the latest drupal version from http://drupal.org and extract it to the folder of your choice under ~/public_html. Say ~/public_html/drupal 2. In the drupal folder change permissions of /default/settings.php to 766 to make it writable to by all users 3. Once the things has been completed access the directory through the browser. If you had named the drupal folder as drupal you can now access it as http://localhost/~username/drupal 4. Create a database named drupal_db (your choice) in MySQL through the MySQL Query Browser or throuh the mysql command line client for Drupal. Also create a user for drupal. You can do by running the following query GRANT ALL PRIVILEGES ON drupal_db.* TO 'some_username'@'localhost' IDENTIFIED BY 'some_pass' WITH GRANT OPTION; 5. After a couple of simple questions to be answered Drupal should be up and running. Configuring Drupal Clean URLs converts the querystrings that come in a normal URL into an integral part of the URL. By enabling Clean URLs you would improve the readability of the URL and also increase your google page ranking. We had already enabled mod_rewrite above. So we just have to make sure that Clean Urls is enabled in Drupal administration Other Tweaks Install sendmail to be able to send out mails from drupal. sudo apt-get install sendmail Edit: We have updated the information about enabling userdir module and its configuration. Thanks Kirri Ubuntu Web Development Apache PHP MySQL Leave a reply Your email address will not be published. Required fields are marker * Tim (not verified) access_time 25 Mar 2019 - 06:29 I checked the apache2.conf file and the lines of code in step 9 do not appear. To this point i have followed the instructions exactly, until step 11. I even tried to add the code manually but the gedit /etc/apache2/apache2.conf didn't work. Any ideads what i may be doing wrong? I tried skipping over and finishing the steps but didn't work and i ended up reinstalling ubuntu and starting over. Now i don't want to move on till i get each step. Thanks for any help you can give me. Tim (not verified) access_time 25 Mar 2019 - 06:29 When i try to open the /var/www/sites/default/settings/php firefox just stries to download it, instead of open it... I can't figure out why. Kirri (not verified) access_time 25 Mar 2019 - 06:29 http://heriman.wordpress.com/2008/08/05/enabling-apache-user-home-publi… This way is much easier. We don't need to change the contents of apache2.conf and httpd.conf. I tested it. PlusNoob (not verified) access_time 25 Mar 2019 - 06:29 am wondering if this would work at all on f.ex FreeBSD, anyone who know? directory (not verified) access_time 25 Mar 2019 - 06:29 Step by step its looking easier I,ll try this if i found anything new I,ll definitely share with you grate work keep it on thanx for a valuable information Pagination Current page 1 Page 2 Next page Next › Last page Last » Add new comment
close

on 19th June 2012 / by vimal
Sometimes we may require updating several rows of data with different queries and make sure every query execute correctly to keep the database consistency. Here is a simple solution to enable such transactions with Mysql and Python. To do this, we can start a transaction and commit the changes to the table. The data will be written to the table only after the commit statement is executed. If there is an error in between, we can rollback, so that all the inconsistencies are cleared. To enable transactions, make sure you have set Innodb as the database engine for all the tables you require to support the transaction. The default MyIsam engine will not support transactions. You can do this by altering the required table with the SQL: ALTER TABLE ENGINE = InnoDB; In python, with MySQLdb driver, you can turn off the autocommit and use rollback or commit to the connection. Example: import MySQLdb #Start a connection db= MySQLdb.connect(host="dbhost", user="dbuser" , passwd="dbpass", db="dbname") db.autocommit(False) cursor = db.cursor() try: cursor.execute("Your SQL") cursor.execute("Another sql") db.commit() except: db.rollback() MySQL Database Administration Python Leave a reply Your email address will not be published. Required fields are marker *
more_horiz
close

on 01st November 2012 / by webmaster
Many Drupal users have encountered a lot of instances of the following error in the dblog of their site "Got error 28 from storage engine query: SELECT DISTINCT(p.perm)". If you found yourself encountering the same error in your Drupal website then read on to find out the solution. Most of the time this occurs in shared hosting sites with the MySQL server running out of disk space. So the following tips will help to solve the issue. Clean up your /var/log/mysql Clear your /tmp directory or request your host to do so. (This solved it for a lot of users). Hope that helps. The easiest way to solve a Drupal issue is to hand it to the Drupal experts. We can provide a wide range of Drupal services to help you maintain and manage your Drupal websites. Get in touch with us to know more. Reference: http://drupal.org/node/44160 Drupal MySQL Drupal Issues Leave a reply Your email address will not be published. Required fields are marker *
Leave a reply
Your email address will not be published. Required fields are marker *

Filtered HTML

  • Web page addresses and email addresses turn into links automatically.
  • Allowed HTML tags: <a href hreflang> <em> <strong> <cite> <blockquote cite> <code> <ul type> <ol start type='1 A I'> <li> <dl> <dt> <dd> <h2 id='jump-*'> <h3 id> <h4 id> <h5 id> <h6 id>
  • Lines and paragraphs break automatically.
The content of this field is kept private and will not be shown publicly.
CAPTCHA This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.