alldata localhost

Post Reply
OsaD
Newbie
Newbie
Posts: 5
Joined: Thu Oct 12, 2017 8:00 pm
Station model: Davis Pro 2 / With WD
Software: Meteotemplate

alldata localhost

Post by OsaD » Fri Oct 13, 2017 5:36 pm

First, Iet me introduce myself. My name is Pat Walls living in Murphy, TX USA. I became interested in weather in the 6th grade back in the late 1940's. At that time, weather was only a 30 second to 1 minute slot on the local radio stations. In the 8th grade, my favorite uncle enhanced my interests by giving me a very expensive Airguide barometer and a 50# surplus VHF receiver. With the latter, I could tune into Geiger Field in Spokane, WA and get direct and more detailed weather information from the airport (That barometer hangs on my wall to this day). I have been an. active ham radio operator since 1958 and coupled that with my weather hobby on many occasions. In 1977 I built my first computer and started writing software. In the early 2000's I started building servers and developing websites. One of my first was www.k7pw.me and I later designed my first weather website using Weather Display and Weather Display Live software. We downsized and moved to Murphy Texas a year ago and decided to build a new weather station. Then I came across Meteotemplate and a great fellow, Jachym. For the past 4 months, I have been learning about new methods of website construction and programming. I have a beta website www.murphywx.net/template/index.php on an outside hosted server until I get php and MySQL set up on my personal server. An that is the reason for this post. Here is my problem.

I have my server up and running, and can connect Template to MySQL at local host. But when I put a name like alldata for the database, It can't find the database. and won't connect. So I went to the SQL database and added an empty (alldata)folder in the master data directory and ran the SQL test again and it connected and said database created. I went to the SQL data base and found three new alldata files. I am thinking success at last....not! The first file had some about 20 garbled characters scattered all over. The second file was blank and the third also had some scrambled characters...none seemed to be related to the actual alldata setup file.. This told me that template was connecting to localhost, but not really uplaading a table.

Anyway, I completed the setup.php document, but it would not save. Gave a message about needing administrative credentials. Ironic as I am the sole user and administrator on this server. It suggested I recheck my SQL configuration to resolve the problem. In the setup installation of MySQL there are two places to add credentials. Both are set to Administrator and have the same temorary password for setup and use.. Has anyone experiecned similar problems.??

Thanks Pat

User avatar
Luc
Developer
Developer
Posts: 168
Joined: Mon Aug 21, 2017 6:40 am
Location: Paramaribo, Suriname
Station model: Davis Pro 2 (2x)
Software: WeeWX
Contact:

Re: alldata localhost

Post by Luc » Fri Oct 13, 2017 6:13 pm

Hi Pat,
Welcome to the forum!

What should work is the following.
With a program like MyPhpAdmin create a new database.
Let's call it mt (any name will do).
Then create a database user mt_user (again anyname will do).
Set password to mt_password (any password will do).
Give this user all rights for database mt.

Then start Meteotemplate.
Log in as Meteotemplate admin (this is NOT the mt_user!) you will have to setup a password for meteotemplate admin and also a password for meteotemplate update (to be used to sent data via the api).

Start the main setup program of meteotemplate.
At the database section set:
server to localhost
database to mt
database user to mt_user
database user pasword to mt_password
check test connection
When OK, meteotemplate has created an empty table with name 'alldata' in database mt.

Hope this helps.

Cheers, Luc
Image

OsaD
Newbie
Newbie
Posts: 5
Joined: Thu Oct 12, 2017 8:00 pm
Station model: Davis Pro 2 / With WD
Software: Meteotemplate

Re: alldata localhost

Post by OsaD » Fri Oct 13, 2017 6:39 pm

t\Thanks, luc
I am going to start this right now. I will have to change my A records from the hosted server to mine which could take an hour or so. I will let you know.

OsaD
Newbie
Newbie
Posts: 5
Joined: Thu Oct 12, 2017 8:00 pm
Station model: Davis Pro 2 / With WD
Software: Meteotemplate

Re: alldata localhost

Post by OsaD » Fri Oct 13, 2017 6:59 pm

before I start, shout that new mt folder be saved in the data directory of MySQL data? I believe that is where the api manages the weather data.

User avatar
Luc
Developer
Developer
Posts: 168
Joined: Mon Aug 21, 2017 6:40 am
Location: Paramaribo, Suriname
Station model: Davis Pro 2 (2x)
Software: WeeWX
Contact:

Re: alldata localhost

Post by Luc » Fri Oct 13, 2017 7:48 pm

Maybe we are talking about the same.

When you start myPhpAdmin and log in as database admin you will notice a screen which looks like folders and sub-folders.
But they are not.
The 'folders' are in fact the names of MySQL databases.
The 'sub-folders' are tables within a MySQL Database.

So 'mt' would be your MySQL database and within this database you will create a table 'alldata' with help of the main setup program of meteotemplate.

As soon as this table 'aldata' is present, the meteotemplate program api.php can store weather results to the table 'alldata'.
The program api.php does not work by itself. It has to be called with actual weather data. But this is a different chapter.
Let's create the alldata table first.
Image

OsaD
Newbie
Newbie
Posts: 5
Joined: Thu Oct 12, 2017 8:00 pm
Station model: Davis Pro 2 / With WD
Software: Meteotemplate

Re: alldata localhost

Post by OsaD » Mon Oct 16, 2017 4:45 am

Hi Luc Sorry for the delay in my follow-up to your response. First, my command com and Shell programming skills are not very strong so put that on the back burner and did a few other things and have more information. I read that UAC (user access control) Cannot be disabled even by an administrator This means that if the server sees and action it thinks could be harmful it will deny further action and give a message "you do not have high enough admin privileges". I am the admin and the only user on all of my servers. So, I fired up a retired Server 2012 and went through the Template setup again with the same results. NOW ANYONE READING THIS WHO HAS INSTALLED MYSQL 5.7 OR OLDER ON A WINDOWS SERVER FEEL FREE TO MAKE COMMENTS . (Or probably any other server)

When I put my credentials into the MySQL test in Template with alldata as the name, it will not connect, If I leave the data file name off, it will connect and says can't find "a data file.". If I then create an empty directory in the SQL data folder and do the SQL test again, it connects and says "data file created" I then go back into the SQL alldata folder and see it has created 3 scripts titled alldata.frm, alldata.myd and alldata.myi. The first has a foot long stream of non recognizable characters, the second is empty and the third has about a three foot long string of random characters. This tells me that Template can connect and write "stuff" to SQL via localhost. So I am not sure why when I try to save the setup.php data I get a message that data cannot be written to SQL. check your credentials in MySQL???

Tonight I discovered that a required file is not being included in the MySQL set up. It is called SQL Visual Studio 2010....or higher. In the setup process, it lists files that are not installed. You go through an execute process that downloads this file and installs it. automatically and says successful. This evening I noticed that file was not installed on the server. I went through the install again and it confirmed 3 time that the visual studio program was installed OK. I saw a little box that said CHECK and pressed it. It said that visual studio failed. Not sure if this causing the problem or no, but I have to figure a way to bypass the auto install and do it manually.

Any or all comments are appreciated. I have built many servers since 2004 but this is the first that required PHP/SQL. PHP was a piece of cake, but SQL does not have a user friendly disposition!!.

Pat

User avatar
Luc
Developer
Developer
Posts: 168
Joined: Mon Aug 21, 2017 6:40 am
Location: Paramaribo, Suriname
Station model: Davis Pro 2 (2x)
Software: WeeWX
Contact:

Re: alldata localhost

Post by Luc » Mon Oct 16, 2017 3:57 pm

Hi Pat,

Sorry, I have no experience with MS server.

The *.frm, *.myd and *.myi are the MySQL MyISAM tables. They are internal MySQL files and don't contain any readable format.

To maintain a MySQL database you need a DBA (Data Base Administration) program.
The following link show a number of free DBA's
https://techtalk.gfi.com/top-10-free-da ... ys-admins/
Firebird and DBVisualizer Free run both on Windows.
May be there are better programs, but as I said, I'm not familiar with this platform.

You have to create a database first with the DBA. Don't call this database alldata, because this will cause confusion with the table alldata!
Also create with the DBA a dabase user wich has all the rights for the created database.

Hope this helps.

Cheers, Luc
Image

Post Reply