Results 1 to 10 of 10

Thread: Attempted to reset MySQL Password and now cannot start sugarMySQL Service

  1. #1
    jcary is offline Member
    Join Date
    Apr 2009
    Posts
    7

    Default Attempted to reset MySQL Password and now cannot start sugarMySQL Service

    I'll start by admitting that this is not a bug and was totally caused by our system administrator = me.

    During the installation process of FastStack Windows Installer for 5.2.0c with MySQL I set a password for mySQL and PHP. A couple weeks later I attempted to access phpmyadmin and could not remember the username and password I specified during installation.

    I attempted to reset the username and password using this command : "mysqld.exe --defaults-file ="c:\program files\sugarcrm-5.2.0c\mysql\my.ini" --init-file=c:\mysql-init.txt".

    Here is the contents of mysql-init.txt: ""UPDATE mysql.user SET Password=PASSWORD('axion#1') WHERE User='sugarcrm';
    FLUSH PRIVILEGES;" (I also tried changing the user to "root"

    The command executed perfectly, but now when I try to restart the sugarmySQL service I get an error 1067. Thanks in advance for your help.

  2. #2
    andopes's Avatar
    andopes is offline A Sugar Hero | Help Forum Moderator
    Join Date
    Jul 2006
    Location
    São Paulo - Brazil
    Posts
    8,335

    Default Re: Attempted to reset MySQL Password and now cannot start sugarMySQL Service

    Edit the config.php and update the password according to the one you set on mysql

    if you forget the password for any SugarCRM user so go to phpMyAdmin and run this command:

    Code:
    UPDATE users SET user_hash = MD5(user_name) WHERE user_name = 'the_user';
    Cheers
    André Lopes
    DevToolKit / Project of the Month - June 2009
    Lampada Global Services- Open Source Solutions
    Avenida Ipiranga, 318
    Bloco B - CJ 1602
    São Paulo, SP 01046-010
    Brazil
    Office: +55 11 3237-3110
    Mobile: +55 11 7636-5859
    e-mail: andre@lampadaglobal.com

    Lampada Global delivers offshore software development and support services to customers around the world.
    Lampada is proud to be a SugarCRM Gold Partner, revolutionizing Customer Relationship Management.

    I DO NOT answer questions through PM and Email. If you need some help post your question into SugarForum.

  3. #3
    jcary is offline Member
    Join Date
    Apr 2009
    Posts
    7

    Default Re: Attempted to reset MySQL Password and now cannot start sugarMySQL Service

    Thanks so much Andre. Here are the contents of my config.php file: "<?php
    /**
    * Front controller for config view / download and clear
    *
    * @package phpMyAdmin-setup
    * @author Piotr Przybylski <piotrprz@gmail.com>
    * @license http://www.gnu.org/licenses/gpl.html GNU GPL 2.0
    * @version $Id: config.php 11582 2008-09-10 16:53:28Z lem9 $
    */

    require './lib/common.inc.php';
    require_once './setup/lib/Form.class.php';
    require_once './setup/lib/FormDisplay.class.php';

    /**
    * Returns config file contents depending on GET type value:
    * o session - uses ConfigFile::getConfigFile()
    * o post - uses POST textconfig value
    *
    * @return string
    */
    function get_config() {
    $type = PMA_ifSetOr($_GET['type'], 'session');

    if ($type == 'session') {
    $config = ConfigFile::getInstance()->getConfigFile();
    } else {
    $config = PMA_ifSetOr($_POST['textconfig'], '');
    // make sure our eol is \n
    $config = str_replace("\r\n", "\n", $config);
    if ($_SESSION['eol'] == 'win') {
    $config = str_replace("\n", "\r\n", $config);
    }
    }

    return $config;
    }


    $form_display = new FormDisplay();
    $form_display->registerForm('_config.php');
    $form_display->save('_config.php');
    $config_file_path = ConfigFile::getInstance()->getFilePath();

    if (isset($_POST['eol'])) {
    $_SESSION['eol'] = ($_POST['eol'] == 'unix') ? 'unix' : 'win';
    }

    if (PMA_ifSetOr($_POST['submit_clear'], '')) {
    //
    // Clear current config and return to main page
    //
    $_SESSION['ConfigFile'] = array();
    // drop post data
    header('HTTP/1.1 303 See Other');
    header('Location: index.php');
    exit;
    } elseif (PMA_ifSetOr($_POST['submit_download'], '')) {
    //
    // Output generated config file
    //
    header('Content-Type: text/plain');
    header('Content-Disposition: attachment; filename="config.inc.php"');
    echo get_config();
    exit;
    } elseif (PMA_ifSetOr($_POST['submit_save'], '')) {
    //
    // Save generated config file on the server
    //
    file_put_contents($config_file_path, get_config());
    header('HTTP/1.1 303 See Other');
    header('Location: index.php');
    exit;
    } elseif (PMA_ifSetOr($_POST['submit_load'], '')) {
    //
    // Load config file from the server
    //
    $cfg = array();
    require_once $config_file_path;
    $_SESSION['ConfigFile'] = $cfg;
    header('HTTP/1.1 303 See Other');
    header('Location: index.php');
    exit;
    } elseif (PMA_ifSetOr($_POST['submit_delete'], '')) {
    //
    // Delete config file on the server
    //
    @unlink($config_file_path);
    header('HTTP/1.1 303 See Other');
    header('Location: index.php');
    exit;
    } else {
    //
    // Show generated config file in a <textarea>
    //
    header('HTTP/1.1 303 See Other');
    header('Location: index.php?page=config');
    exit;
    }
    ?>"

    How exactly do I edit it?

  4. #4
    JVWay is offline Sugar Community Member
    Join Date
    Sep 2007
    Location
    Corvallis, Oregon
    Posts
    452

    Default Re: Attempted to reset MySQL Password and now cannot start sugarMySQL Service

    Andre's talking about the config.php in sugar root. In there you'll see a line for your database password. Set that to the same as the one you entered for your MySql db.
    Jerry Way
    Business Process Administrator

    Sugar 6.1.4 Professional
    (Testing 6.1.2)
    LAMP on Centos 5
    PHP 5
    MySQL 5
    Apache 2.2

  5. #5
    jcary is offline Member
    Join Date
    Apr 2009
    Posts
    7

    Default Re: Attempted to reset MySQL Password and now cannot start sugarMySQL Service

    Thanks Jerry. The only config.php file on my system in the located in C:\Documents and Settings\All Users\Documents\phpMyAdmin-3.1.3.1-all-languages\setup. I don't see an area to set a password. Also unfortunately I've forgotten the db password. That's unfortunately how I created this problem.

  6. #6
    JVWay is offline Sugar Community Member
    Join Date
    Sep 2007
    Location
    Corvallis, Oregon
    Posts
    452

    Default Re: Attempted to reset MySQL Password and now cannot start sugarMySQL Service

    On the box where sugar is installed look in the Sugar root directory. I'm not familiar with the fast track installers but if you search that box for config.php you will come up with that file.

    http://dev.mysql.com/doc/refman/5.0/...rmissions.html

    Has steps for resetting your root password. Once back into MySQL you can reset the sugarcrm database password. Put this password into the \<sugarroot\config.php file. It's gotta be there; somewhere.
    Jerry Way
    Business Process Administrator

    Sugar 6.1.4 Professional
    (Testing 6.1.2)
    LAMP on Centos 5
    PHP 5
    MySQL 5
    Apache 2.2

  7. #7
    jcary is offline Member
    Join Date
    Apr 2009
    Posts
    7

    Default Re: Attempted to reset MySQL Password and now cannot start sugarMySQL Service

    Thanks. I found another config file in the htdocs folder and see the admin username and password. Unfortunately I'm still stuck because since I tried the instructions at http://dev.mysql.com/doc/refman/5.0/...rmissions.html I can't restart the sugarmysql service

  8. #8
    JVWay is offline Sugar Community Member
    Join Date
    Sep 2007
    Location
    Corvallis, Oregon
    Posts
    452

    Default Re: Attempted to reset MySQL Password and now cannot start sugarMySQL Service

    I don't have mysql installed on Windows but for services like Microsoft SQL server you would need to change the password in the service as well. So go to the properties of the service and you should find a user listed somewhere. Associated with that should be a password.

    I've advanced to the Linux world so my recollection of all that is fuzzy. If you need more assistance I can fire up a Windows vmware and review.
    Jerry Way
    Business Process Administrator

    Sugar 6.1.4 Professional
    (Testing 6.1.2)
    LAMP on Centos 5
    PHP 5
    MySQL 5
    Apache 2.2

  9. #9
    jcary is offline Member
    Join Date
    Apr 2009
    Posts
    7

    Default Re: Attempted to reset MySQL Password and now cannot start sugarMySQL Service

    Thanks so much Jerry. At this point I'm stuck. I basically need to undo the instructions listed here so that sugar the sugarmySQL service tries to load normally. If I can get back to where I was before I ran that command, then I'll be good to go.

  10. #10
    jcary is offline Member
    Join Date
    Apr 2009
    Posts
    7

    Default Re: Attempted to reset MySQL Password and now cannot start sugarMySQL Service

    Now that I know how to access my password. I'm going to create a new thread for the error 1067 issue. Thanks so much for all of your help.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. How do I reset the admin password?
    By clint in forum Help
    Replies: 11
    Last Post: 2011-09-30, 06:13 AM
  2. How to reset a users password
    By JPNL in forum Help
    Replies: 10
    Last Post: 2009-03-26, 01:19 PM
  3. Replies: 6
    Last Post: 2008-02-25, 01:34 AM
  4. user password will not reset
    By compunet in forum General Discussion
    Replies: 5
    Last Post: 2007-10-29, 02:38 PM
  5. Reset Password
    By smshuja in forum Help
    Replies: 2
    Last Post: 2006-01-11, 10:37 PM

Tags for this Thread

Bookmarks

Posting Permissions

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