<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[FrontAccounting forum — User or password is invalid or you have no permissions to create datab]]></title>
	<link rel="self" href="https://frontaccounting.com/punbb/extern.php?action=feed&amp;tid=6742&amp;type=atom" />
	<updated>2018-04-27T15:31:48Z</updated>
	<generator>PunBB</generator>
	<id>https://frontaccounting.com/punbb/viewtopic.php?id=6742</id>
		<entry>
			<title type="html"><![CDATA[Re: User or password is invalid or you have no permissions to create datab]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=31534#p31534" />
			<content type="html"><![CDATA[<p>So we figured it out. We were able to connect with the db just fine from several other methods. The issue ended up being caused by what seems like a error in the connect_db_mysqli.inc file where it was skipping the </p><div class="codebox"><pre><code>mysqli_select_db($db, $connection[&quot;dbname&quot;]);</code></pre></div><p>We changed it to <br /></p><div class="codebox"><pre><code>{
    global $db;

    $db = mysqli_connect($connection[&quot;host&quot;], $connection[&quot;dbuser&quot;], $connection[&quot;dbpassword&quot;], &quot;&quot;,
        !empty($connection[&quot;port&quot;]) ? $connection[&quot;port&quot;] : 3306); // default port in mysql is 3306

    //If no name is selected we will not be able to select a database nor create one just return
    if (!$connection[&quot;dbname&quot;])
        return 0;
    
    //Try and select the specified database
    $selectedDB = mysqli_select_db($db, $connection[&quot;dbname&quot;]);

    //If the db doesn&#039;t exist create the database
    if (!$selectedDB)
    {
        $sql = &quot;CREATE DATABASE IF NOT EXISTS `&quot; . $connection[&quot;dbname&quot;] . &quot;`&quot;
            . &quot; DEFAULT COLLATE &#039;&quot; . get_mysql_collation($connection[&quot;collation&quot;]) . &quot;&#039;&quot;;

        if (!mysqli_query($db, $sql) || !mysqli_select_db($db, $connection[&quot;dbname&quot;]))
            return 0;
    } else {
        //else just use the selected db and ensure that the collation is set correclty
         if ($selectedDB)
         {
            if (!db_set_collation($db, $connection[&quot;collation&quot;]))
            {
                echo mysqli_error($db);
                return 0;
            }
        }
        else
            return 0;
    }
    return $db;
}</code></pre></div><p>And now it works.</p>]]></content>
			<author>
				<name><![CDATA[RedCone]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=42404</uri>
			</author>
			<updated>2018-04-27T15:31:48Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=31534#p31534</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: User or password is invalid or you have no permissions to create datab]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=31523#p31523" />
			<content type="html"><![CDATA[<p>@redcone How did you create the database, user and password?&nbsp; Perhaps you can test that you can access the database with something like phpmyadmin.</p>]]></content>
			<author>
				<name><![CDATA[cambell]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=19447</uri>
			</author>
			<updated>2018-04-25T04:16:13Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=31523#p31523</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: User or password is invalid or you have no permissions to create datab]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=31517#p31517" />
			<content type="html"><![CDATA[<p>Check the <strong>config_db.php</strong> file if your db access credentials for the target company are okay and the privileges have been flushed for it to come into effect.</p>]]></content>
			<author>
				<name><![CDATA[apmuthu]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=364</uri>
			</author>
			<updated>2018-04-25T02:51:32Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=31517#p31517</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: User or password is invalid or you have no permissions to create datab]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=31508#p31508" />
			<content type="html"><![CDATA[<p>@cambell, that part of the question was asked by @FCazabon. However, I&#039;ve tried with 127.0.0.1 and localhost respectively, and still am not able to access the db.</p>]]></content>
			<author>
				<name><![CDATA[RedCone]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=42404</uri>
			</author>
			<updated>2018-04-24T14:50:17Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=31508#p31508</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: User or password is invalid or you have no permissions to create datab]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=31504#p31504" />
			<content type="html"><![CDATA[<p>@redcone&nbsp; The database uses port 3306 not port 81.&nbsp; 3306 is the default, so you can just leave the :80 off the database server setting.&nbsp; So 127.0.0.1 should be fine.</p>]]></content>
			<author>
				<name><![CDATA[cambell]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=19447</uri>
			</author>
			<updated>2018-04-24T10:03:32Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=31504#p31504</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: User or password is invalid or you have no permissions to create datab]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=31501#p31501" />
			<content type="html"><![CDATA[<p>I have tried this solution, and variations thereof, but I still get the message &quot;Cannot connect to database. User or password is invalid or you have no permissions to create database.&quot;</p>]]></content>
			<author>
				<name><![CDATA[RedCone]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=42404</uri>
			</author>
			<updated>2018-04-24T03:53:05Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=31501#p31501</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: User or password is invalid or you have no permissions to create datab]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=31420#p31420" />
			<content type="html"><![CDATA[<p>Try to explicitly put in:<br /></p><div class="codebox"><pre><code>error_reporting = E_ALL &amp; ~E_NOTICE &amp; ~E_DEPRECATED</code></pre></div>]]></content>
			<author>
				<name><![CDATA[apmuthu]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=364</uri>
			</author>
			<updated>2018-04-14T06:45:04Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=31420#p31420</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: User or password is invalid or you have no permissions to create datab]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=31408#p31408" />
			<content type="html"><![CDATA[<p>I have the same issue. My php.ini file states </p><p>; error_reporting<br />;&nbsp; &nbsp;Default Value: E_ALL &amp; ~E_NOTICE &amp; ~E_DEPRECATED &amp; ~E_STRICT</p><p>From what I can find other places, this should have solved the issue, but it doesn&#039;t. What am I missing?</p>]]></content>
			<author>
				<name><![CDATA[RedCone]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=42404</uri>
			</author>
			<updated>2018-04-13T04:05:27Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=31408#p31408</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: User or password is invalid or you have no permissions to create datab]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=27675#p27675" />
			<content type="html"><![CDATA[<p>Turn off strict mode on PHP 5.6+ as date and time fields will otherwise not recognize zero values.</p>]]></content>
			<author>
				<name><![CDATA[apmuthu]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=364</uri>
			</author>
			<updated>2017-04-05T19:27:09Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=27675#p27675</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[User or password is invalid or you have no permissions to create datab]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=27670#p27670" />
			<content type="html"><![CDATA[<p>Hi,</p><p>I&#039;m new to XAMP and FrontAccounting and am having some issues when trying to install.&nbsp; I&#039;ve looked at the other posts that referred to this same error message:</p><p>Cannot connect to database. User or password is invalid or you have no permissions to create database.</p><p>But neither has helped me get over this first hurdle.</p><p>I have installed XAMPP for Windows 5.6.28 on my 64bit Windows 8.1 laptop.</p><p>I have IIS running as well so I changed the httpd.conf to Listen 81.</p><p>Version information:<br />Apache/2.4.23 (Win32) OpenSSL/1.0.2h PHP/5.6.28<br />10.1.19-MariaDB</p><p>I manually created a new user, setting the Host Name to localhost and selected this check box: Create database with same name and grant all privileges.</p><p>Accessing the install page (http://localhost:81/frontaccounting/install/index.php) shows everything as OK on the first page.&nbsp; When I hit continue and enter the server host as: 127.0.0.1:81, put in my database user, password and database name (I&#039;m 99% sure I&#039;ve got these details correct) then hit continue, it takes a few minutes before the above error message is displayed.</p><p>I&#039;d appreciate any advice on troubleshooting this.</p>]]></content>
			<author>
				<name><![CDATA[FCazabon]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=41167</uri>
			</author>
			<updated>2017-04-04T15:21:01Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=27670#p27670</id>
		</entry>
</feed>
