• Resolved aengineer

    (@aengineer)


    I’m reinstalling WP after an experimental install that worked fine (after some help here). This time, anticipating multiple future blogs I installed it in a subdirectory. The path is like: https://jcm2044.net/WP1/BLOG1/

    So far as I could tell I did not need to alter the wp-config.php file from before, although I decided to anticipate future installations by changing the table prefix from the default.

    wp-config.php now reads (with security editing of the userid and password

    <?php
    // ** MySQL settings ** //
    define(‘DB_NAME’, ‘ABC_WP’); // The name of the database
    define(‘DB_USER’, ‘DEF’); // Your MySQL username
    define(‘DB_PASSWORD’, ‘GHIJ’); // …and password
    define(‘DB_HOST’, ‘mysql8.ixwebhosting.com’); // 99% chance you won’t need to change this value

    // You can have multiple installations in one database if you give each a unique prefix
    $table_prefix = ‘AT_ ‘; // Only numbers, letters, and underscores please!

    // Change this to localize WordPress. A corresponding MO file for the
    // chosen language must be installed to wp-includes/languages.
    // For example, install de.mo to wp-includes/languages and set WPLANG to ‘de’
    // to enable German language support.
    define (‘WPLANG’, ”);

    /* That’s all, stop editing! Happy blogging. */

    define(‘ABSPATH’, dirname(__FILE__).’/’);
    require_once(ABSPATH.’wp-settings.php’);
    ?>

    When I get to step-2 of the installation I now get a page full of errors like the following:

    WordPress database error: [You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near ‘usermeta ( umeta_id bigint(20) NOT NULL auto_increment, use]
    CREATE TABLE AT_ usermeta ( umeta_id bigint(20) NOT NULL auto_increment, user_id bigint(20) NOT NULL default ‘0’, meta_key varchar(255) default NULL, meta_value longtext, PRIMARY KEY (umeta_id), KEY user_id (user_id), KEY meta_key (meta_key) )

    What have I done to try and fix the problem?
    1) Deleted the old database and created the new one
    2) Checked that my user permissions are full admin
    3) Forced a reset of the password

    None of these worked.

    – Does WP not allow multiple subdirectories such as I’ve created?
    – Do I have to change a path variable somewhere?

    Suggestions?

    Thanks

    Jim Mitchell

Viewing 6 replies - 1 through 6 (of 6 total)
  • 1. Just for the record: your example is a sub-subdirectory!
    2. I’d stick to lower case with directory names.
    3. I have WP installed even in a subdirectory of a subdomain, like
    subdomain.example.com/blog
    and it works.
    4. I have installed WP in a subdirectory on ixwebhosting and it worked.

    Thread Starter aengineer

    (@aengineer)

    I tried to follow moshu’s advice – with no luck. Here’s what I did.
    – deleted all the files
    – changed the directories to lower case – it’s now jcm2044.net/wp/at
    – unzipped the wp file into a folder locally
    – moved those files into the local …./jcm2044.net/wp/at folder
    – edited the wp-config.php file in dreamweaver to the same state as before except now the table prefix is “at_”
    – uploaded all the files via dreamweaver
    – ran the install script.

    As before, step 2 produces lots of SQL errors – the first few are below.

    I’m baffled.

    Jim Mitchell

    *******************

    Second Step

    Now we’re going to create the database tables and fill them with some default data.

    WordPress database error: [You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near ‘usermeta ( umeta_id bigint(20) NOT NULL auto_increment, use]
    CREATE TABLE at_ usermeta ( umeta_id bigint(20) NOT NULL auto_increment, user_id bigint(20) NOT NULL default ‘0’, meta_key varchar(255) default NULL, meta_value longtext, PRIMARY KEY (umeta_id), KEY user_id (user_id), KEY meta_key (meta_key) )

    WordPress database error: [You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near ‘options (option_name, option_value, option_description, autoloa]
    INSERT INTO at_ options (option_name, option_value, option_description, autoload) VALUES (‘siteurl’, ‘https://jcm2044.net/wp/at&#8217;, ‘WordPress web address’, ‘yes’)

    WordPress database error: [You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near ‘options (option_name, option_value, option_description, autoloa]
    INSERT INTO at_ options (option_name, option_value, option_description, autoload) VALUES (‘blogname’, ‘My Weblog’, ‘Blog title’, ‘yes’)

    ……………

    You are sure it’s a MySQL database you’ve created and not a PostgreSQL?

    Thread Starter aengineer

    (@aengineer)

    Yes I’m sure. I installed it to the same database using almost exactly the same wp-config.php file two days before (and deleted all those tables before starting to install this time – as well as changing the prefix).

    The reason I started again was that I anticipate having multiple blogs and decided to have a directory structure in which all blogs live in a directory named “wp”

    Jim Mitchell

    Thread Starter aengineer

    (@aengineer)

    I finally got it installed. To do so I had to take the following steps and am not sure which one solved the problem.

    1) Deleted all previous WP folders locally and on the server
    2) Deleted the DB on the server and then recreated it
    3) Forced new password on the database – same as old one
    4) Unpacked WP to the folder where I wanted it, then renamed that folder to the name I wanted “at”, rather than copying files to the “at” folder from somewhere else.
    5) Recreated the wp-config.php file, exactly as before, but typing in the information afresh.

    Somehow this did it.

    Hmmmmm.

    I can’t figure out which of those made it to work… but hey! The good news is it works, finally. Glad to hear that and happy blogging.

    [and mark the thread solved]

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘SQL Error on Install to Subdirectory’ is closed to new replies.