Jump to content
sudodo

Can someone explain these DB Name fields etc please

Recommended Posts


I'm not sure that I really follow this page;

http://imgur.com/a/hCxqg

I've created a database when setting up the server, so I'm presuming that this
is what's being asked for here?

The page linked for getting setup 

http://webdesign.tutsplus.com/tutorials/how-to-install-and-setup-processwire-cms--cms-25509
doesn't really mention anything about these fields.

After trying to use the user name on the server, and the password that I entered
when setting up the mySQL to start with I got the following error (so I had
filled in "DB Name"={some name that I thought up }, "DB user" = {name of user on
server}, "DB pass" = {pass i set up for mySQL});

http://imgur.com/a/cgFKq

After this i tried using

db name; {whatever}
db user; {name of user on server}
db pass; {password for user on server}

This didn't work either, so I'm not sure what I'm meant to put here.
 

Share this post


Link to post
Share on other sites

Hi, make sure that db host and db port are valid, I often forget to change db host value if not localhost and receive such an error.

  • Like 1

Share this post


Link to post
Share on other sites

You should find the ip of db host in your hosting or db configuration, ie. when I create a new db on my hosting provider it shows me ip and port to access it.

  • Like 1

Share this post


Link to post
Share on other sites

@Mike Rockett thanks - I don't even know if the DB exists yet - shouldn't it create it if it doesn't? 

 I should just be able to enter some random name for the DB Name field and PW will set it up? 

That's not working... 

thanks

Share this post


Link to post
Share on other sites

Did you set up a new database and user specifically for this ProcessWire installation? If so, you would have had to give it a database name, username, and a password. That is what's being asked for here. Usually the port is 3306 and host is localhost, so that should be good.

This would be different from just a generic MySQL setup.

  • Like 1

Share this post


Link to post
Share on other sites

@thetuningspoon no i didnt - i installed mysql on the server etc and set a password when I did that, but I've not set one up for the PW install. 

 

I thought that this page is meant to handle that? 

Share this post


Link to post
Share on other sites

i've done nothing except setup LAMP then go through the processwire install up to this point. 

I thought this would setup the db, I can't find a guide on this part. I don't know what these errors mean. 

I don't know if this is useful 

 

w0n6uEL.png 

Share this post


Link to post
Share on other sites
Quote

I thought that this page is meant to handle that? 

That page is just asking you for the connection details to an existing database. ProcessWire can't create one, you have to do that ahead of time.

Share this post


Link to post
Share on other sites

Renobird is not 100% correct. ProcessWire does try to create a db for you, but it does need the access rights to do so. I'm not sure if that's the case for your setup.

  • Like 1

Share this post


Link to post
Share on other sites

@renobird from the page "If the database does not exist, we will attempt to create it", this implies that it should work? And in the setup guide id didn't go through setting up a database for use with processwire I don't think. 

OK cool though - so I need to create a database (anything specific about it?) 

 

@LostKobrakai yes this is what i thought... So this access is a problem then isn't it? I don't know why the access isn't there? I've followed the guide, is there something that I should check here? 

 

Thanks

Share this post


Link to post
Share on other sites

Gah, I meant to say "If ProcessWire can't create one..." Sorry.

My point was that if PW is can't create it, you should create it yourself and then just put in the connection details.

 

Share this post


Link to post
Share on other sites

I've always had them created before I get this stage, so I'm no real help here. :P

  • Like 1

Share this post


Link to post
Share on other sites

@renobird no problem ;) It seems i haven't been prepared! 

If you could link me to a suitable guide on what to setup though that would be appreciated, as I've never actually setup a database before D: 

Then I can try with the details made.

BTW - I can't launch mysql from the command line on the server unless I use sudo, I'm not sure if this means anything or not. 

Thanks

Share this post


Link to post
Share on other sites

If you're doing this from the command line and are already logged into MySQL, here are the commands to use:


    1.    create database databasename;
    2.    \u databasename
    3.    create user 'databasename_u'@'localhost' identified by 'password';
    4.    grant all on databasename.* to 'databasename_u'@'localhost';

 

Replace "databasename" with the name you want for your database.

Share this post


Link to post
Share on other sites

This issue is not really about ProcessWire, but LAMP+MySQL if I understand it correctly. You can google around, or look it up on youtube, eg:

 

Edited by szabesz
typos

Share this post


Link to post
Share on other sites

@szabesz I've installed LAMP already - this is (i think) about the interaction between PW and the server... or something along those lines. 

 

@thetuningspoon no worries - i was just reading those instructions then they vanished :(

Share this post


Link to post
Share on other sites
Just now, sudodo said:

@szabesz I've installed LAMP already - this is (i think) about the interaction between PW and the server... or something along those lines. 

At the and of the video, you can see how to setup the database. This is what I found, but you might be able to find better tutorials. I've never used LAMP, but phpMyadmin comes with it, so you can just look for phpMyadmin tutorials.

  • Like 1

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By gebeer
      Hello all,
      wasn't sure where to put this, so it goes in General section.
      Ryan shows a hook that we can use to mirror files on demand from live server to development environment to be up to date with the files on the server without having to download complete site/assets/files folder.
      I just implemented this but had problems getting files to load from a site in development that is secured with user/password via htaccess.
      First I tried to use WireHttp setHeader method for basic authentication like this
      function mirrorFilesfromLiveServer(HookEvent $event) { $config = $event->wire('config'); $file = $event->return; if ($event->method == 'url') { // convert url to disk path $file = $config->paths->root . substr($file, strlen($config->urls->root)); } if (!file_exists($file)) { // download file from source if it doesn't exist here $src = 'http://mydomain.com/site/assets/files/'; $url = str_replace($config->paths->files, $src, $file); $http = new WireHttp(); // basic authentication $u = 'myuser'; $pw = 'mypassword'; $http->setHeader('Authorization: Basic', base64_encode("$u:$pw")); $http->download($url, $file); } } But, unfortunately this didn't work.
      So now I am using curl to do the download. My hook function now looks like this
      function mirrorFilesfromLiveServer(HookEvent $event) { $config = $event->wire('config'); $file = $event->return; if ($event->method == 'url') { // convert url to disk path $file = $config->paths->root . substr($file, strlen($config->urls->root)); } if (!file_exists($file)) { // download file from source if it doesn't exist here $src = 'http://mydomain.com/site/assets/files/'; $fp = fopen($file, 'w+'); // init file pointer $url = str_replace($config->paths->files, $src, $file); $u = 'myuser'; $pw = 'mypassword'; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_TIMEOUT, 50); // crazy high timeout just in case there are very large files curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_USERPWD, "$u:$pw"); // authentication curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC); // authentication curl_setopt($ch, CURLOPT_FILE, $fp); // give curl the file pointer so that it can write to it curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); $data = curl_exec($ch); curl_close($ch); } } Now I can load files and images from the htaccess protected development server 🙂
      If anyone knows how to get this to work with WireHttp, please let me know. Thank you.
    • By alanxptm
      Hi, I have already tried in different ways and many times to migrate but I always have issues at the end.
      Here's what I have done so far:
       
      case 1:
      1. Install PW on live server (all normal)
      2. Import local DB into live DB
      3. Front page site seems to work but I cannot login into admin page
      case 2 (I'm currently on this stage):
      1. Copied all files from local to live server
      2. Import local DB into live empty DB
      3. Front page works, but any other page and admin page are 404
       
      In both cases:
      - I have changed config.php info accordingly to live server (DB name, DB user and pwd, userauthsalt code)
      - Uncommented RewriteBase / and RewriteBase /pw/ lines on .htaccess
      - applied owner and group permissions to www-data for PW location
      - applied permissions to folders and files accordingly
      - applied a2enmod rewrite to apache2 on live server and restarted service
       
      I have read some posts (Ryan's too) about migration and it seems to me that I'm doing it fine, don't know what it fails-
      I'm on VMWare machine, Ubuntu Server 18.04, php 7.2, phpMyAdmin 5.0.1
      Hope you can help me, thanks in advance
    • By rushy
      Hi. I've been using Processwire for a few years now and installed it on a few different shared hosting servers without issues, but I'm now running into an issue on a Fasthosts shared server that I've not seen before. The installation goes ok and I have a working default site profile but I am unable to complete any uploads of images. It just hangs at the progress spinner during the upload. I thought it might be a priviledge issue so have temporarily set the dir / file privs. as 777 / 666 just to test that but it made no difference. I have no errors in the wire log. In server error log I have:
      set_time_limit() has been disabled for security reasons in ....htdocs/wire/core/ImageSizerEngine.php on line 1035 and i note in the assets/file dir. where the image is being stored the date on the file being created has a year of 1970 and 0 length. If I leave the page this file disappears and nothing has been stored. 
      Does anyone know how I can enable set_time_limit if this is likely to be the problem? 
      Many thanks! Paul
    • By Clemtre
      I'm designing a portfolio website for a friend with a bit of p5. Adapting the css to all device formats and pixel density is driving me crazy so I'd like to use a CMS
      Website and sql database are hosted on the same domain at OVH
      When I try to set up processwire, I get this error message
       

       
      Here is the sql database I use (I have no idea if these informations are confidential)

      I understand this post might be cringeworthy as I'm completely noob to this domain, my apologies.
      Thanks a lot for your help 
    • By prestoav
      Hi there,
      I have a marketplace site that used the older Fredi module for front end editing so advertisers can create and edit their adverts (in the form of pages). After upgrading to v3.0 of Processwire I'd like to change the editing method for users to the new, core front end editing methods. However, it seems that with this method any editor can edit any page (subject to template restrictions for their user role). Using Fredi I checked the user and created user were equal before displaying edit buttons (clunky but it worked).
      Is there any stock way to restrict front end editing to the creator of the page so that my advertisers can only edit their own ads or should I test for user as before?
      Thanks in advance as always 🙂
×
×
  • Create New...