Mysqli error on ste...
 
Notifications
Clear all

Mysqli error on step 2 [SOLVED]

6 Posts
3 Users
0 Reactions
2,335 Views
(@butterflyfiction2)
Posts: 6
Active Member
Topic starter
 

URL to your eFiction: http://butterflyfiction.we.bs
Version of eFiction: 3.5.3
Have you bridged eFiction, if so with what?:No
Version of PHP: 5.2
Version of MySQL: 5.1.50
Have you searched for your problem: Yes
If so, what terms did you try: Mysqli error, installing
State the nature of your problem: Warning: mysqli::mysqli() [mysqli.mysqli]: (42000/1044): Access denied for user 'betsie_efiction'@'%' to database 'efiction' in /home/www/butterflyfiction.we.bs/includes/mysqli_functions.php on line 7
A fatal MySQL error was encountered.
ERROR: Failed to connect to the database!

Do you have a test account for us? no

This is on step 2.
I'm not very code smart. I can do very very basic html. Other than that I can change colors and images and that's it, so please help.


 
Posted : 21/05/2012 5:56 pm
(@babaca)
Posts: 722
Member Moderator
 

It sounds like you don't have the correct username and password to your sql database. (you might want to remove your link to the install, hackers may have a field day with it). Check your config.php file and make sure you have the correct things plugged in for your database.


******************************************
Mucking around in eFiction since circa 2001 (ver. 1.0)
Now running v.3

 
Posted : 22/05/2012 4:31 pm
(@butterflyfiction2)
Posts: 6
Active Member
Topic starter
 

I checked my config.php file and it says this:

Warning: include_once(_BASEDIRincludes/mysqli_functions.php) [function.include-once]: failed to open stream: No such file or directory in /home/www/butterflyfiction.we.bs/includes/dbfunctions.php on line 2

Warning: include_once() [function.include]: Failed opening '_BASEDIRincludes/mysqli_functions.php' for inclusion (include_path='.:/usr/local/php5/lib/php') in /home/www/butterflyfiction.we.bs/includes/dbfunctions.php on line 2

Fatal error: Call to undefined function dbconnect() in /home/www/butterflyfiction.we.bs/config.php on line 10

Just a wrong username and password for my database? What would I need for that? I sat here trying every single thing I could for the username and password the first time. Ahh I'm just so clueless πŸ™


 
Posted : 29/05/2012 7:15 pm
(@babaca)
Posts: 722
Member Moderator
 

When you signed up for your webhost did you also sign up for SQL? If so you had to create a password for the database so it can be set up. I'm not familiar with we.bs do they host your pages? Or is that down somewhere else?

In any case your config.php file (found in the Docs folder) should look like this:

<?php 
$dbhost = "localhost";
$dbname = "dbname";
$dbuser= "dbuser";
$dbpass = "dbpass";
$sitekey = "";
$settingsprefix = "settings";

include_once("includes/dbfunctions.php");
if(!empty($sitekey)) $dbconnect = dbconnect($dbhost, $dbuser,$dbpass, $dbname);

?>

dbhost can stay as "localhost"; (don't delete any quotation marks or semicolons)
dbname is the name of what you set your efiction database as when you created the sql database
dbuser is your username or if you set your sql database using somethings like admin then use that
dbpass is the password you created for your sql database
sitekey can stay blank because when you do the install on efiction it will create a sitekey
I would also leave settingsprefix as "settings";

Your sql database is not usually the same username/password you use to upload your files to your webhost. In any case you plug in the things mentioned in my list above. Save that config.php file; set the chmod to 666 (you might have to get help with doing that, but it's pretty easy, it just depends on how you upload your files.  Then try again. (oh and don't put your settings here on this forum for your safety and the safety of your website.


******************************************
Mucking around in eFiction since circa 2001 (ver. 1.0)
Now running v.3

 
Posted : 29/05/2012 7:39 pm
(@butterflyfiction2)
Posts: 6
Active Member
Topic starter
 

I have it set to this:

<?php 
$dbhost = "localhost";
$dbname = "";
$dbuser= "";
$dbpass = "";
$sitekey = "";
$settingsprefix = "settings";

include_once("includes/dbfunctions.php");
if(!empty($sitekey)) $dbconnect = dbconnect($dbhost, $dbuser,$dbpass, $dbname);

?>

Still not sure if that's the user for it, I never had to make a username for it, but I did have to make a password for it.

Though now when I press enter on the install it gives me this:
Warning: mysql_connect() [function.mysql-connect]: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) in /home/www/butterflyfiction.we.bs/install/install.php on line 903


 
Posted : 29/05/2012 9:05 pm
(@lyndsie)
Posts: 1263
Member Moderator
 

I think that you're going to have to talk to your host. It looks like the issue is with the server configuration. Make sure you give them a copy of the message you put in the last post.

You should edit your post and remove the dbname, dbuser.


 
Posted : 29/05/2012 10:18 pm
Share: