Results 1 to 3 of 3
  1. #1
    Join Date
    Dec 2007
    Location
    Payson, AZ
    Posts
    1,076
    Plugin Contributions
    15

    Default Don't use "root" for installs on XAMPP, or anywhere

    This may or may not help, but something that happen to me and I see some others with similar issues.

    I had to do a wipe and upgrade of my PC due to jumping versions of Linux... normal event, so did my backups of all my testing and active ZC installs. As I was rebuilding my OS, I also downloaded a new xampp install and set it up. 'xampp-linux-x64-1.8.3-4-installer.run'

    came with:
    Apache 2.4.9 (Unix)
    OpenSSL 1.9.1g
    PHP 5.5.11 (Zend: 2.5.0)
    MySQL 5.6.16

    Server OS: Linux 3.13.0-36-generic

    Everything went as expected and seamed to be working, until I accessed one of my test sites...

    Problem:
    Front of the store was a mess, no template, products so on.. tried to access admin, could not log in, didn't recognize the user or password. Came back to the forum and found hacks to fix admin login, did that, no luck. Tried a new install using ZC 1.5.3, it crashed and would not finish installing... again, tried some of the fixes and even thought that the installer sql syntax was off... I finely, got a message that said no 'connection to database' that's what I need to fix.

    Solution:
    There is no problems with ZC, may need to change some of the install instructions someday, but it's still the best cart program I've came across. The problem is with MySQL 5.6.16 and I'm not sure how far back this goes... ROOT user is not allowed access outside of phpmyadmin or root shell account. So if you created the database and left root as the only user, give root to the config files, you are not getting into that database until you resolve the user access issues, which means you can't use ROOT as the store database user anymore. It's about time this process became easer to do and it keeps host from restricting you from creating users...

    So, before you install/upgrade you need to access phpmyadmin for your account.
    1) create a new database user with a strong password.
    2) Create the database that you will use for your site.
    3) From the new database, add the user and assign privileges... do not use 'GRANT'.

    If you don't use 'create, alter, or drop' you wont be able to install/remove mods from the ZC admin.

    this should be normal..

    Name:  Screenshot_mysql1.jpg
Views: 468
Size:  30.6 KB

    Now you can continual with the install/upgrade as you would of before... be sure to add this user in your config files and not root. The user and database in the image no longer exist..

    so, lesson learned... always create a database user!! Passing it along
    Dave
    Always forward thinking... Lost my mind!

  2. #2
    Join Date
    Nov 2007
    Location
    Sunny Coast, Australia
    Posts
    3,378
    Plugin Contributions
    9

    Default Re: General Install/MySQL Issues..

    Quote Originally Posted by davewest View Post
    came with:
    Apache 2.4.9 (Unix)
    OpenSSL 1.9.1g
    PHP 5.5.11 (Zend: 2.5.0)
    MySQL 5.6.16

    Server OS: Linux 3.13.0-36-generic

    ......

    Now you can continual with the install/upgrade as you would of before... be sure to add this user in your config files and not root. The user and database in the image no longer exist..

    so, lesson learned... always create a database user!! Passing it along
    There is no such problem with MySQL 5.5.x (ie on my local dev environment).

    Is your server OS Debian (Ubuntu, Mint) based or a derivative of the Red Hat family (CentOS...) ? This could make a difference when accessing MySQL as Root.

  3. #3
    Join Date
    Jan 2007
    Location
    Australia
    Posts
    6,167
    Plugin Contributions
    7

    Default Re: General Install/MySQL Issues..

    Quote Originally Posted by davewest View Post
    Now you can continual with the install/upgrade as you would of before... be sure to add this user in your config files and not root.
    Just to clarify. If the site is hosted on a *shared* server you won't have access to the root account anyway.

    If you have a VPS the root account should *only* be used for administrative purposes an NOT used for the ZenCart database (or any other public facing database). This is a huge security risk.

    Quote Originally Posted by davewest View Post
    so, lesson learned... always create a database user!! Passing it along
    From http://www.zen-cart.com/content.php?...stall-zen-cart
    Database Setup

    On the next screen, you are asked for Database Information about your MySQL database, username and password. These can be obtained from your cPanel or equivalent control screen provided by your host. If you do not have a clean MySQL database setup with a username and password, you will need to create one.
    Contact your Hosting site if you need assistance in creating a MySQL database table and/or username and password. Note that you need to have your database and userID created before the Zen CartŪ installer can continue past this screen.

    ----------------------------------------------------------

    Although your advice is perfectly valid it doesn't apply to the majority of ZenCart users ... The exception being for those with a VPS and those installing on their own computer (local install).

    As stated, the root account should never be used for public facing databases anyway, and with *most* local installs the root restriction that you have observed doesn't exist (See comments by Frank18), such a restriction would be applied as the default settings for whatever distro you are using (Centos being one example that I can think of).

    Cheers
    RodG

 

 

Similar Threads

  1. When I turn on "Use Proportional Images" , my additional images don't show?
    By Cruisemart in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 4 Dec 2011, 04:00 AM
  2. Replies: 6
    Last Post: 13 Jan 2011, 12:36 AM
  3. " Orders, Group Pricing, PayPal IPN " and "reports" can't use !
    By greenlight in forum Customization from the Admin
    Replies: 1
    Last Post: 8 Sep 2008, 12:45 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg