Hi! Lucky guess, but still I have absolutely no idea of your setup or intents ;-)
Anyway, you have granted permissions to 'dwu'@'localhost' (meaning "dwu accessing from localhost"), but IIRC you are trying to access it from anywhere, right? Try granting permissions to 'dwu'@'%' (meaning "dwu accesing from anywhere") to see if it changes anything. https://stackoverflow.com/questions/11634084/are-users-user-and-userlocalhost-not-the-same P.S. Dude, that's 101 on db permissions, are you sure you want to develop this? ;-) P.P.S. And another security concern: never, Never, EVER, post a password again on a forum (another 101, just in case ;-) On Wed, Dec 11, 2019 at 3:36 PM dw1970 <[email protected]> wrote: > Hi, Javier, > > Good point, I have made changes in the amf_config.ini so that the webroot > is > now > webroot =/var/www/vhosts/bbrchk.com/httpdocs > > After the change and recorded it with Charles 4.5.5, I got a different > warning (seems like closer to fixing) > mysqli_connect(): (HY000/1045): Access denied for user 'dwu'@'localhost' > (using password: YES) in > */var/www/vhosts/bbrchk.com/httpdocs/Services/BookClub/LevelService.php* > on > line *44*<br /> > > < > http://apache-flex-users.2333346.n4.nabble.com/file/t1290/2019-12-11_Charles03.png> > > > After checking cPanel of the database, I have a user dwu and a password of > say, Password88! > So, in the LevelService.php, I put in > > class LevelService { > > var $username = "dwu"; > var $password = "Password88!"; > var $server = "localhost"; > var $port = "3306"; > var $databasename = "bookclub"; > var $tablename = "level"; > > var $connection; > > /** > * The constructor initializes the connection to database. > Everytime a > request is > * received by Zend AMF, an instance of the service class is > created and > then the > * requested method is invoked. > */ > public function __construct() { > $this->connection = mysqli_connect( > > $this->server, > > $this->username, > > $this->password, > > $this->databasename, > $this->port > ); > > So, when I run http://www.bbrchk.com/testprodserver/TestProdServer.html I > got this warning > mysqli_connect(): (HY000/1045): Access denied for user 'dwu'@'localhost' > (using password: YES) in > */var/www/vhosts/bbrchk.com/httpdocs/Services/BookClub/LevelService.php* > on > line *44*<br /> > > I have search the internet and somebody said the password must be clear of > special characters to make this work. So I changed the password to > Password88 (get rid of the !), but cpanel will accept password without > special characters. I am stuck again with the problem. > > Please help > > > > > -- > Sent from: http://apache-flex-users.2333346.n4.nabble.com/ >
