Jump to:

23379 Posts in 18298 Topics by 2867 members

General Questions

SilverStripe Forums » General Questions » Changed mysql root password, now website won't load

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 1317 Views
  • silver1
    Avatar
    Community Member
    2 Posts

    Changed mysql root password, now website won't load Link to this post

    I hope someone can assist with this.

    We had a working silverstripe website up and running but I had to reset the root password on the mysql database and now the site won’t load anymore. I should point out that the site was developed by someone else and I have very little knowledge of Silverstripe. From searching the internet I managed to turn on dev mode and I’m now getting a more descriptive error message which is “[Warning] mysql_connect() [function.mysql-connect]: Access denied for user 'root'@'localhost' (using password: YES)”.

    I’m assuming that because I changed the database password I now need to change the password on the Silverstripe end, does this sound likely? if this is the case I’m not sure how I go about it.

    Can anyone help me with this please?

    Regards

  • swaiba
    Avatar
    Forum Moderator
    1786 Posts

    Re: Changed mysql root password, now website won't load Link to this post

    try mysite/_config.php

  • silver1
    Avatar
    Community Member
    2 Posts

    Re: Changed mysql root password, now website won't load Link to this post

    As soon as I posted this we figured out we were looking at the wrong _config.php. All working ok now.

    swaiba thanks.

  • Signals
    Avatar
    Community Member
    4 Posts

    Re: Changed mysql root password, now website won't load Link to this post

    Sorry, I'm new to SilverStripe. Under the html root, there is no _config.php file, but there is one under /cms/ and others. I don't see in that file where I might change the database password. Where / how can I change it in the SilverStripe config?

    Please help as my site is disconnected from the database right now.

    Thanks in advance.

  • martimiz
    Avatar
    Forum Moderator
    1068 Posts

    Re: Changed mysql root password, now website won't load Link to this post

    Hi signals,

    try /mysite/_config.php , near the top of the file...

  • Signals
    Avatar
    Community Member
    4 Posts

    Re: Changed mysql root password, now website won't load Link to this post

    Thanks, martimiz, but there is nothing in that /cms/_config.php. Perhaps it would help to know what a typical _config.php file should look like and what wording I should be looking for in it to change the password.

    Any help is appreciated.

    Matthew

  • martimiz
    Avatar
    Forum Moderator
    1068 Posts

    Re: Changed mysql root password, now website won't load Link to this post

    Right... but, I did say /mysite/_config.php not /cms/_config.php

    In SilverStripe every module has its own _config.php, used for settings relating to that particular module. Basic modules are: sapphire (the framework) and cms (the backend) You'll probably never have to change any settings in their (core) config files

    mysite is the module that manage your specific website. In the mysite/_config.php file you'll find basic things like the database settings, the default language and the basic theme. Look for something like:

    global $databaseConfig;
    $databaseConfig = array(
       "type" => "MySQLDatabase",
       "server" => "localhost", // or your mysql server address
       "username" => "xxxxx",
       "password" => "xxxxxx",
       "database" => "xxxxxx",
    );

    If you want to get any deeper into SilverStripe, I strongly advise you to check out the tutorials http://doc.silverstripe.org/sapphire/en/tutorials/

  • Signals
    Avatar
    Community Member
    4 Posts

    Re: Changed mysql root password, now website won't load Link to this post

    Martimiz,

    Thanks for your patience on this one. That is very helpful.

    I don't have time to log in now but I will check. I don't believe I saw a directory called /mysite as that would have been obvious to me from what I'd been reading. That's why I figured /mysite was a placeholder for whatever the site name or directory name was. I will look again this weekend and let you know.

    Kindly,
    Matthew

    1317 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.